|
|
#1 |
|
Bizarre issue!!!
Hey guys.
Can someone perhaps help explain this issue I'm having? Essentially I get an error whenever I add an endl or a out stream to another. For example: Code:
cout << ac.getSizeOfCollection(); Code:
cout << ac.getSizeOfCollection() << " Size" <<endl; I have the same issue with this: Code:
cout << "fdsddigifg " << meh.getNumberOfTracks(); // Code:
cout << "fdsddigifg " << meh.getNumberOfTracks() <<" Tracks"<<endl; // |
|
|
|
0
|
|
|
#2 | |
|
Quote:
|
||
|
|
0
|
|
|
#3 |
|
Odds are 'meh.getNumberOfTracks()' is not returning an 'stream&' so there is no stream for 'endl' to do it's thing against.
|
|
|
|
0
|
|
|
#4 | |
|
Quote:
'cout << "fdsddigifg " << meh.getNumberOfTracks()' should return a stream&. 'meh.getNumberOfTracks()' should return a nonnegative integer. |
||
|
|
0
|
|
|
#5 |
|
You're correct! Which is why one should never respond under the effect of pain.
Thanks for catching that. |
|
|
|
0
|
|
|
#6 |
|
We don't have enough info. meh.GetNumberOfTracks()... What does it return? Did you write the operator<< method to handle this? How about ac.getSizeOfCollection? Can you output ANYTHING after one of these? Is the problem just endl? What is the problem? A compiler error? What is it? A runtime error? Incorrect results?
-Lee |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 07:55 AM.







Linear Mode
