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.tx t");
string linia;
while(getline(i n,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::TextBo x::set_Text(Sys tem::
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.tx t");
string linia;
while(getline(i n,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::TextBo x::set_Text(Sys tem::
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
Comment