unbale to use string class

rawaldream's Avatar, Join Date: Oct 2009
Newbie Member
HI all
I am just learning the C++ programing.
I am not able to use string class on my program. I installed turboc3 in the system.
Include <String.h> libraray
and there in INclude directory there is string.h file.

but still I am getting the compilation erroe undefined name string
I am using like this
include <iostream.h>
include<string.h>
int main()
{
string a;
cin >> a;
return 0;
}
error message a undefined.
string not defined

could any one help me

thanks in advance.
could send me mail rawalssm@gmail.com
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Try "#include" instead of "include".
0
rawaldream's Avatar, Join Date: Oct 2009
Newbie Member
Quote:
Originally Posted by xpi0t0s View Post
Try "#include" instead of "include".

Thanks I used the same thing.
still unable to use String class.
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Possibly string only exists in the std namespace; if so you'd have to prefix it with std::.