General C++ Programming - November 2016 (Page 18)

by bozmin
implementing a list of a class
 
Is it possible to have a List of a class inside that class?? Lets say I have my Clients class in the file " Client.h " Client.h class Client{ public...
[3 replies] Last: Is it possible that this code works? Yes. If yes, how could I imple... (by coder777)
File Output Font Control
 
I am trying to create a program that will create a randomly generated eye-sight chart. I understand how to write to the file, i just don;t know how to change th...
[2 replies] Last: If you need to set a specific font for the output you need to use .rtf... (by Thomas1965)
by V07
Calculating MD5 of a file
 
I've been searching in the internet for calculating MD5 of a file and I have installed CrytoC++ Library and I need to find MD5 of a file using that Library and ...
[1 reply] : http://www.codeproject.com/Articles/462746/A-Cplusplus-SHA-and-MD-Impl... (by Thomas1965)
multidimensional vector with 9 dimension
 
I want to create a 9 dimensional vector for my computer vision project. I have learned how to create 2 and 3 dimensional vectors with its size initialized but d...
[5 replies] Last: Ok i got how i can do it. By using dynamic memory allocation method i ... (by dinesh999lama)
After the basics
 
I understand the basic of C++, as in (if else statements, loops, conditions,) and generally how to make a program but I don't understand how to practically appl...
[2 replies] Last: What are you looking to do? Find something you want to make, and ma... (by mbozzi)
finding the max power using recursion
 
i have this program assignment and one part of it is trying to find the max power a number will go to(x) without exceeding a number the user inputs it not to ex...
[4 replies] Last: Didn't your other post, here http://www.cplusplus.com/forum/general/20... (by mbozzi)
by PCP63
fstream Newbie Help! (1,2)
 
Using xCode, FWIW. Basically, didn't really get this concept in class, and cannot figure it out by searching online so far. Here's my assignment: "You are to ...
[30 replies] Last: Thanks for sticking with my question despite initial confusion due to ... (by PCP63)
Smallest, Largest, Average- C language
 
Write a program that asks the user how many numbers she would like to compare; Then accepts her inputs. The program should output the largest, the smallest and ...
[9 replies] Last: #include <stdio.h> int main(){ //n = amount of numbers input ... (by Boxbird)
How to make File a Reference Parameter??
 
Here is the question: Change function Print so it reads from file "data.in". Make input file a ref. parameter to function Print. Assume Name in one line & Addr...
[3 replies] Last: Lol didn't notice the simplest thing xD works well now thanks! :D (by jyesudha)
Help Please
 
#include <iostream> void getBalance(float); /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namesp...
[2 replies] Last: 2. a = ((max*100) - (min * 100)) + 1; Should be : a = int(((max *... (by Boxbird)
C++ Error
 
#include<iostream> #include<stdlib.h>//for exit using namespace std; void inchtocent(float);//prototypes for conversion function void centtoinch(float); ...
[7 replies] Last: Here is another program if you can help me please. #include <iostream... (by tennisnash2)
No viable conversion?
 
#ifndef GRAPHICS_H #define GRAPHICS_H #include <string> using namespace std; #include "Color.h" #include "utility.h" class Graphics { public: ...
[2 replies] Last: The error you are getting means the compiler sees no way to take a sin... (by Plover)
by mbozzi
What does this template code expand to?
 
I found this on Stack Overflow, here, and simplified it slightly: http://stackoverflow.com/a/6245777 # include <iostream> # include <tuple> template<class Tu...
[1 reply] : Okay -- I figured it out on my own now. The parameter pack expands t... (by mbozzi)
Student Statistics
 
Hello everyone, First would like to say I am new to this forum and C++ programming. I am in my first semester of programming and have been asked to write a pro...
[1 reply] : One problem is in >> Number; The first column is the name but you re... (by Thomas1965)
rand() Crashes.
 
Hello, I am currently trying to program tic tac toe and the console crashes once i use the rand() funktion and try to assign it to a variable. This is the wh...
[2 replies] Last: Seems like I forgot to change it to (rand() % 2). Thanks for helping ^... (by Gammel2012)
Text colour and Sleep
 
How to make the system sleep for sometime (like seconds)? Also, how to change the text colour in c++? I saw a program written a long time ago and it uses dos...
[2 replies] Last: You should almost always prefer the standard APIs over platform APIs i... (by mbozzi)
Second largest and smallest number
 
I need to read numbers from a txt file and find the the number of numbers, max, min, average, sum, second largest, and second smallest number. I cant seem to fi...
[1 reply] : Could you clarify what you want to do for "second largest" if, say, th... (by lastchance)
What does this function do ?
 
When executed the program outputs : The result is 55. I'm not sure how that result was processed any help or hints would be much appreciated. Thank you for yo...
[5 replies] Last: [quote=lFoxiel]I'm not sure how that result was processed any help or ... (by closed account 1vRz3TCk)
Reading white spaces of a c-string from fstream
 
Hi guys, I am not sure how to include white spaces in my output. For example, this is the file it should read from. 3 1001 McDonald Figure 100 10.90...
[2 replies] Last: WOW THANKS! IT WORKS PERFECTLY :) (by Helexander)
Undeclared identifier 'red'.
 
I'm not understanding why return red, green, and blue gives me the error that there is an undeclared identifier. Also, my checkRange function should make sure t...
[2 replies] Last: If, as @wildblue speculated, your red, green and blue variables are pa... (by doug4)
November 2016 Pages: 1... 1617181920... 23
  Archived months: [oct2016] [dec2016]

This is an archived page. To post a new message, go to the current page.