You have the following options: Write using namespace std; after the include and enable all the std names: then you can write only string on your program. Write using std::string after the include to enable std::string : then you can write only string on your program. Use std::string instead of string.
The identifier is undeclaredIf the identifier is a variable or a function name, you must declare it before it can be used. A function declaration must also include the types of its parameters before the function can be used.
I can't declare a string in my program:
string MessageBoxText = CharNameTextBox->Text;
it just doesn't work. It says string is undeclared identifier
. What am I missing in the namespace or include or something like that?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With