/Users/marcosortiz/CLionProjects/Ortiz_Lab9/main.cpp:14:32: error: expected '(' for function-style cast or type construction
readIn(infile, vector<int> &vec);
I get this error for my print() functions as well. Any idea on how to fix this would be greatly appreciated. I will also paste my .cpp and .h files
you have confused function calls and prototypes, best I can tell. prototypes go outside of main, generally above it, for the functions you will define later. Main calls them but not of the format foo(type variable) but only foo(variable). the type does not belong in the call to the function, only in the definition and proto. Look at what I have done here:
try this.. it should be close, but you do need the function bodies for readin & print etc to compile it.
as a side note prefer [] to .at() using vectors unless you NEED at().
(and use code tags <> on the format bar to the side next time please)
Yes thank you ( I'm personally still having trouble with functions). So, I edited my code to match what you suggested. The code now compiles successfully but when I run the code nothing is displayed and it returns 0. Which ends the code...
I looked into my print function and everything looks fine (I think)