April 22nd, 2010 12:49 PM
#1
writing a string to a text file
hello, I am using visual c++ 2005 and I am trying to take a value that a user selects on a combo box and then output it to a file, but with the code I have it seems I cannot output a string to a file as it has to be a char
how can you get around this?
String^ alert = alertbox->Text;
ofstream file("file.txt");
file << alert;
compile error:
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'System::String ^' (or there is no acceptable conversion)
thanks!
Reply With Quote
April 22nd, 2010 01:48 PM
#2
Re: writing a string to a text file
Try the Managed C++ forum.
April 23rd, 2010 08:54 AM
#3
Re: writing a string to a text file
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks