My code is simple. This file is being added to a MSVC++ 6.0 program once I get past this error. Below you'll see the header and source file.
Code:#ifndef READCONFIGFILEH #define READCONFIGFILEH #include <string> void ReadConfig(int Values[], unsigned int *SizeValues); #endifMy error is:Code:// This is ReadConfigFile.cpp #include <cstdlib> #include <string> #include <iostream> #include "ReadConfigFile.h" void ReadConfig(int Values[], unsigned int *SizeValues) { string infile("C:\\TrackerConfig.txt"); }
ReadConfigFile.cpp(9): error: identifier "string" is undefined
which means it doesn't know variable infile
I have #included <string> header file so I do not know what is going wrong. I already tried #included <string.h>, which didn't help. Any advice is greatly appreciated!