So im sure i have a few things wrong, but when I run this program it always fails at opening the file. what am i doing wrong? i mean i know that the file location is correct.
It also might be a good idea to get rid of the full path and only use the "hockey.txt" file. Just make sure the hockey.txt file is in your project folder.
This works for Code::Blocks but not wxDev-C++. Which IDE are you using?
EDIT: Dev-C++ would be the same as wxDev-C++. They both expect to see files with relative directories in the same folder as the executable. This is because they change the PATH variable of the command shell for the instance that it is running from.
@Mathhead200: Using relative paths has to do with the operating system. The only reason that wxDev-C++ (maybe M$VC? I'm not 100% on that) resets the path to match that of the executable is so that you don't get confused when you go to run it outside of the IDE. Otherwise the relative path is your current directory, that is the one that you are executing the compiler from or in other words the directory of your project.