Hi all
I'm a real newbie to c++ and have the following issue that I was hoping you guys could solve for me.
I want to use strings end up with error :-( Heres my code
#include <iostream.h>
#include <string.h>
int main(int argc, char* argv[])
{
int fred;
string jas;
fred = 0;
cout << "In main\n" << fred;
return 0;
}
When I try and compile this I get error C2065: 'string':undeclared identifier, and this is driving me nuts for something so simple...
Any ideas what I need to do to overcome this? I've hunted through MSDN and it seems to imply that the header I included is correct so something is obviously up...
I have noticed that if I only include <string> I can sucessfully declare a string by doing std::string fred.
Should I always use std::string or should I be able to use the code in my example.
Thanks for advice!!