+ 1
How to store a string/word in a variable in Turbo C++?
Since the 'string' variable is not working in Turbo C++. It displays error message as the program does not recognize 'string' as a variable.
3 odpowiedzi
+ 3
can I see your code buddy?
I hope that after looking your code then only I can say anything 😊
0
Sure ! The code is as follows :
#include<iostream.h>
#include<string.h>
class MyClass
{
public:
string name;
};
void main()
{
MyClass myObj;
myObj.name="Sololearn";
cout<<myObj.name;
}
The problem here is that the string variable is not working 😟 ?!