I include string in stdafx.h (which VC++2005 creates to manage all the headers).
Then i decide to make it a function that outputs hello above the main():
- Code: Select all
void helloOutput(string string1)
{
cout<<string1;
}
Then I decide to put this function in its own header file called, MainHeaders.
I then reference this header file in stdafx.h but when I compile it says that "string is an undelcared identifier" so I am guessing that means that I have not included <string>. But it will be the main file that uses this function, and the main file has stdafx included.
What is wrong?
Thanks.