I'm trying to read in a number of rows and columns from the first line of a text file. They're the first two items in the file, and separated by spaces.
When I make my program, I get error: no match for ‘operator>>’ in ‘mazein >> rows’
My code is not finished, so if there are loose ends or useless declarations, I haven't yet gotten to coding that. Please try to ignore any other issues/problems/preferences and just help me with the operator problem.
I hadn't thought that could cause an operator error. I added a * before rows and cols and it works. Thank you! (just learned pointers and references as well)
operators are just shorthand for function calls. If there is no operator >> written that knows what to do with input parameters ifstream and pointer-to-int (as in this case), you get an error much as if you were trying to call a function that doesn't exist.