Jan 4, 2011 at 4:53am
I dunno if there are a few ways, if so I'd like to know them all. But how do turn a string from a textBox into an int and also a char?
Thanks
Last edited on Jan 4, 2011 at 4:55am
Jan 4, 2011 at 11:00pm
I got a code a while back, but it confused me to no end.
So, Just so I'm clear how would you do this?
#include <iostream>
#include <fstream>
int main()
{
int a;
a = textBox1->Text GetWindowText();
ofstream myfile;
myfile.open ("example.txt");
myfile << a;
myfile.close();
system("example.txt");
}
Jan 5, 2011 at 10:11pm
Is that all the actual code you've got??
What is textBox1 ??
Jan 7, 2011 at 12:18am
Thanks, could this also be used to name the "myfile"?
ofstream myfile (str2);
???