I am trying to get the entire contents of a text file, and i am looking at this push back reference and I copied it almost the same, but It still wont work, why?
||=== Build: Debug in Find and Replace (compiler: GNU GCC Compiler) ===|
C:\Users\thund_000\Desktop\Find and Replace\main.cpp||In function 'int main()':|
C:\Users\thund_000\Desktop\Find and Replace\main.cpp|17|error: expected ')' before 'strToFind'|
C:\Users\thund_000\Desktop\Find and Replace\main.cpp|17|error: expected ';' before ')' token|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
The compiler says it right there, it expected a ')' before 'strToFind' on the line 17 (which is 10 in your code snippet).
Your while loop's closing parenthesis is after your push_back() line, you're trying to call separate functions/instruction inside the while condition.