M
man
Hello,
At first I have to warn you - I'm a newbie so don't shout me down and don't
beat me .
I have a few problems concerning programming using VC++ .NET Std 2003
(particularly Windows Forms):
1) I do not know how to take text fram a text file and paste it into a
textBox. I can do it like that:
ifstream in("teksttt.txt");
ofstream out("teksttt.txt");
string linia;
while(getline(in,linia))
asa += linia + "\n";
but then I can't paste it into textBox:
textBox1->Text = in;
It shows a problem/error:
"error C2664: 'void System::Windows::Forms::TextBox::set_Text(System::
String__gc*)' : cannot convert parameter 1 from 'std::ifstrem' to
'System::String__gc*' "
How to convert 'string' into other one to make possible pasting it into a
textBox?
What type should I use?
2) I have to paste the text like this one:
"There are n men and m women.":
"There are " + n.ToString + " men and " + m.ToString " women."
Am i right?
Thanks in advance...
man
At first I have to warn you - I'm a newbie so don't shout me down and don't
beat me .
I have a few problems concerning programming using VC++ .NET Std 2003
(particularly Windows Forms):
1) I do not know how to take text fram a text file and paste it into a
textBox. I can do it like that:
ifstream in("teksttt.txt");
ofstream out("teksttt.txt");
string linia;
while(getline(in,linia))
asa += linia + "\n";
but then I can't paste it into textBox:
textBox1->Text = in;
It shows a problem/error:
"error C2664: 'void System::Windows::Forms::TextBox::set_Text(System::
String__gc*)' : cannot convert parameter 1 from 'std::ifstrem' to
'System::String__gc*' "
How to convert 'string' into other one to make possible pasting it into a
textBox?
What type should I use?
2) I have to paste the text like this one:
"There are n men and m women.":
"There are " + n.ToString + " men and " + m.ToString " women."
Am i right?
Thanks in advance...
man