So I'm working on a program where you fill in some textboxes and press a button to generate a .txt file with the texts in it...
I'm working in Visual Studio Express (C++)
The only thing i have so far is:
private: System::Void btnAdd_Click(System::Object^ sender, System::EventArgs^ e)
{
char text1[20]
fstream file_op("C:\\Textol.txt", ios::out);
file_op<<text1;
file_op.close();
and i included
#include<fstream>
#include<conio.h>
#include<stdio.h>
// and added to namespaces
usingnamespace std;
The textboxes are auto generated etc...
The problem is How to I write the text from the textboxes into my file.. i cant add them like this:
file_op<<txt1->Text;
I have to get some kind of way to save the string texts to a varable.. but how..