Click here to Skip to main content
15,920,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Write String Pin
cpvc++12-Nov-08 18:47
cpvc++12-Nov-08 18:47 
AnswerRe: Write String Pin
rrrado11-Nov-08 4:23
rrrado11-Nov-08 4:23 
QuestionExport Data Pin
MsmVc11-Nov-08 1:31
MsmVc11-Nov-08 1:31 
QuestionRe: Export Data Pin
CPallini11-Nov-08 1:45
mveCPallini11-Nov-08 1:45 
AnswerRe: Export Data Pin
David Crow11-Nov-08 3:07
David Crow11-Nov-08 3:07 
Questionhow to log text from a edit box into file? Pin
puppya11-Nov-08 1:20
puppya11-Nov-08 1:20 
AnswerRe: how to log text from a edit box into file? Pin
_AnsHUMAN_ 11-Nov-08 1:24
_AnsHUMAN_ 11-Nov-08 1:24 
AnswerRe: how to log text from a edit box into file? Pin
wielklem11-Nov-08 1:27
wielklem11-Nov-08 1:27 
//***************************************************

#include <iostream>
#include <fstream>
using namespace std; // !!!!!

//***************************************************

// write to a file:


int main () 
{
  ofstream myfile;
  myfile.open ("example.txt");
  myfile << "Writing this to a file.\n";
  myfile.close();
  return 0;
}


//***************************************************

//read from file:

int main()
{
        string input;
        ifstream myfile("Config\\test.txt"); // crefull with the: \\ !!!!
        getline(myfile,input);
        Edit1->Text = input.c_str(); ///.c_str convert string
        getline(myfile,input);
        Edit2->Text = input.c_str();
        getline(myfile,input);
        Edit3->Text = input.c_str();
}

//***************************************************</fstream></iostream>


wkr,
Willem
QuestionRe: how to log text from a edit box into file? Pin
David Crow11-Nov-08 3:09
David Crow11-Nov-08 3:09 
AnswerRe: how to log text from a edit box into file? Pin
wielklem11-Nov-08 3:19
wielklem11-Nov-08 3:19 
QuestionRe: how to log text from a edit box into file? Pin
David Crow11-Nov-08 3:22
David Crow11-Nov-08 3:22 
AnswerRe: how to log text from a edit box into file? Pin
wielklem11-Nov-08 23:53
wielklem11-Nov-08 23:53 
AnswerRe: how to log text from a edit box into file? Pin
CPallini11-Nov-08 1:41
mveCPallini11-Nov-08 1:41 
QuestionHow to connect remote system in internet Pin
Kiran Pinjala11-Nov-08 1:01
Kiran Pinjala11-Nov-08 1:01 
AnswerRe: How to connect remote system in internet Pin
Mark Salsbery11-Nov-08 6:08
Mark Salsbery11-Nov-08 6:08 
QuestionRe: How to connect remote system in internet Pin
Kiran Pinjala11-Nov-08 22:28
Kiran Pinjala11-Nov-08 22:28 
AnswerRe: How to connect remote system in internet Pin
Mark Salsbery12-Nov-08 6:30
Mark Salsbery12-Nov-08 6:30 
GeneralRe: How to connect remote system in internet Pin
Kiran Pinjala12-Nov-08 18:22
Kiran Pinjala12-Nov-08 18:22 
GeneralRe: How to connect remote system in internet Pin
Mark Salsbery12-Nov-08 20:28
Mark Salsbery12-Nov-08 20:28 
QuestionCreating new buttons (and let them do something) Pin
wielklem11-Nov-08 0:58
wielklem11-Nov-08 0:58 
QuestionRe: Creating new buttons (and let them do something) Pin
David Crow11-Nov-08 3:11
David Crow11-Nov-08 3:11 
AnswerRe: Creating new buttons (and let them do something) Pin
wielklem11-Nov-08 3:31
wielklem11-Nov-08 3:31 
GeneralRe: Creating new buttons (and let them do something) Pin
David Crow11-Nov-08 4:34
David Crow11-Nov-08 4:34 
GeneralRe: Creating new buttons (and let them do something) Pin
wielklem11-Nov-08 23:46
wielklem11-Nov-08 23:46 
GeneralRe: Creating new buttons (and let them do something) Pin
David Crow12-Nov-08 2:47
David Crow12-Nov-08 2:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.