Answer the question
In order to leave comments, you need to log in
How to get text from textBox1 into string variable in CLI?
Here is the code:
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
ifstream fin;
string x = textBox1->Text; // Тут ошибка
fin.open("file.txt");
if (fin.is_open()) {
}
}
E0415 No suitable constructor exists to convert from "System::String ^" to "std::basic_string, std::allocator>"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question