wow, i can't believe i missed that in the for statement! lol. i feel like a dummy.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
istream &operator >>(istream &inStream, const Paragraph ¶)
{
inStream >> para.wordCount;
delete [] para.words; //deallocates arrray
para.words = new string[para.wordCount];
for(int i = 0; i < para.wordCount; i++)
istream >> para.words[i];
return inStream;
}
|
so i changed the code, it all makes sense, but i get 4 errors still:
in reference to line 3 in code i provided here
Error 1 error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'const int' (or there is no acceptable conversion) f:\advancedc++\project 6 (bad libs) chris nelson\bad libs project\main.cpp 196
in reference to line 7 in code i provided here
Error 2 error C2166: l-value specifies const object f:\advancedc++\project 6 (bad libs) chris nelson\bad libs project\main.cpp 200
in reference to line 10 in code i provided here
Error 3 error C2143: syntax error : missing ';' before '>>' f:\advancedc++\project 6 (bad libs) chris nelson\bad libs project\main.cpp 203
in reference to line 10 in code i provided here
Error 4 error C2143: syntax error : missing ';' before '>>' f:\advancedc++\project 6 (bad libs) chris nelson\bad libs project\main.cpp 203