I'm trying to write code to read and display 10 integer values from a text file.
When I try to compile my code, I get an error that says "LNK2019 unresolved external symbol". I can't figure out what's wrong with how I'm declaring my functions.
Look at your declaration for readInts() and how you're calling it:
Declaration:
void readInts (string file, string myInts[] );
How you're calling it:
readInts ("inputLab7.txt", "outputLab7.txt");
Do you see the problem? The declaration is expecting an array of std::strings. You're passing a constchar * which gets promoted to a single std::string.
This should not even have compiled.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.