Beginners - May 2015 (Page 37)

problem in Constructor
 
Hi everyone,,,i write a class of Rational numbers. My constructor with default parameters shows errors,,why?? class Rational{ private: int a,b; public...
[1 reply] : You can't specify default values on your implementation (line 8). (by AbstractionAnon)
by Kman
Adding a new patient into an array?
 
I'm not sure if there's a way to do this in C++, but I'd like to be able to add multiple patients into my program using an array. How can I best go about this? ...
[6 replies] Last: I have two errors with my printAll function. Here's the function: vo... (by Kman)
Overloading "+" in a class.
 
Hello!! I'm creating Array2D class. I'm using this peace of code. template <typename T> class Array2D { public: // constructor Array2D(unsigne...
[2 replies] Last: The canonical way to implement operator+ is to write it as a non-membe... (by keskiverto)
How can i make the first letter of a sentence uppercase
 
I had to use a file to input a text with all capitol letters. The pgm had to make all letters lowercase then change the first letter of each sentence into a ca...
[4 replies] Last: I would do it this way: I would just take the whole sentence at a ti... (by newbiee999)
Trouble with Array Class
 
I am working on designing a class that has an array of floating point numbers. The constructor should accept an integer argument and dynamically allocate the a...
[7 replies] Last: Line 18: theArray should be private. Line 88: The if statement is ... (by AbstractionAnon)
cannot convert for argument '1'
 
i am getting an error in passing the function in the last lines of the code any help! i would suggest that you run the code to know the error guys #in...
[1 reply] : change the first parameter from &person simply to person for all l... (by Gamer2015)
Integer checks
 
Is there an Standard Library function that can check to see if a number is, in fact, a number? Or would I have to define a function of my own? Thanks in advanc...
[1 reply] : There is a standard library function isnan() which will check if a flo... (by Cubbi)
by ry0823
fillArray problem
 
For some reason I keep getting the error that my fillArray was not being declared in the scope that I declared it in. Can anyone help by looking at my code and ...
[8 replies] Last: even if I were to do that I'm really unsure of how to implement them, ... (by ry0823)
map spawning
 
Hello I'm new to C++ programming my friends and I want to make a simple little text adventure room we have some real basic knowledge on C++ I want to make a...
[5 replies] Last: @Peter87, Yeah I'm using std::cin to take in commands from the user an... (by BillJ166)
my code keeps crashing
 
can you help me at this .. this code see a name and email and phone num its address book and its have been 5 days me trying to fix this. p.s: try to run the c...
[2 replies] Last: i did this to the functions but error happens error :cannot convert '... (by ahmed55)
If statement does not seem to work
 
Can someone help me figure out why the program does not exit when I set cont or cont1 to n or N without showing anything else. or do I need to use something oth...
[1 reply] : Change cont to char char cont; And you are not checking the condi... (by konstance)
by enemy
Destructors
 
Hello! Tried to write simpelst code for destructor use. Plese, where is the error? If I want to need destructor, then I need dynamic alocated element. Thanks f...
[12 replies] Last: Many thanks!!! (by enemy)
march of toads
 
hi, i have the code completed but it will not compile and run . i'm taking finals and i will need alot of spare time to fix this code. can anyone plz help me f...
[12 replies] Last: can anyone help me finish my code. its just a few errors to fix thats ... (by jamaalmcmillan)
Structures and Arrays: error code: "local function definitions are illegal"
 
This is my next assignment.: Write a program that reads a student's name followed by their test score. The program should output each students name followed by...
[3 replies] Last: You're missing a return value (by LendraDwi)
concepts ?
 
hello everyone, i'm facing a problem in writing a cplusplus program that produces a bar chart showing the yearly income of a person starting from 1990. The prog...
[1 reply] : Please note, that this is not a homework site. We won't do your homewo... (by keskiverto)
by MRQ1
Windows Programming in C++ how to begin?
 
Hello everyone. I am a bit confused at the moment. I want to learn a bit of windows programming to know how things actually work before I shift to something eas...
[3 replies] Last: Thanks for the reply . I will only learn it for the concepts but i wan... (by MRQ1)
by ry0823
expected unqualified id error
 
why do I keep getting this expected unqualified id error '{' ?? it's on line 42:1 #include <iostream> using namespace std; void fillArray(int a , int size, ...
[1 reply] : At line 43 ARRAY_SIZE is not declare here and you use ; afer function ... (by LendraDwi)
Command argument
 
My code is working, but I need add command argument for my files. #include <iostream> #include <fstream> #include <string> using namespace std; te...
[3 replies] Last: It depends for example int main(int argc, char argv ){ cout<<argv... (by LendraDwi)
by Bocian
How to initialize pointer char array?
 
Hi, I got a class that has a pointer and i'm trying to initialize the values but for some reason im getting overload function errors. Records::Record...
[1 reply] : On lines 7 and 8 you are not allocating memory correctly. You cannot s... (by HatchetMan302)
by siery
Problem with execiuting "getline" in "for loop"
 
Hello! I wrote a small mathematics quiz. The function i have problem with should let the user enter the amount and names of players. Problem appears when prog...
[4 replies] Last: it is implementation-defined whether this function does anything with... (by JLBorges)
May 2015 Pages: 1... 353637383940
  Archived months: [apr2015] [jun2015]

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