Forum: C++ Feb 13th, 2009 |
| Replies: 9 Views: 443 I suppose you could just make printdetails use cout.
void printDetails(dog dogObj){
cout << "The dog is " << dogObj.getAge() << " years old." << endl << endl;
cout << "Dog's Gender?: " <<... |
Forum: C++ Feb 13th, 2009 |
| Replies: 9 Views: 443 if it's working, you should mark the thread as solved, it's my first one :)
also, use [ icode] just for inline code like this, but if you're pasting C++ code, use [ code=cpp] ... [ /code] and it... |
Forum: C++ Feb 13th, 2009 |
| Replies: 9 Views: 443 The problem with the char is this line:
davesDog.setGender("M");
"M" is a character array,
you are passing the letter M and a NULL character ('\0') to the setGender function (the NULL character... |