Click here to Skip to main content
16,005,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Query regarding terminating a thread. Pin
Rajesh_Parameswaran10-Aug-07 5:56
Rajesh_Parameswaran10-Aug-07 5:56 
GeneralRe: Query regarding terminating a thread. Pin
KarstenK12-Aug-07 21:21
mveKarstenK12-Aug-07 21:21 
Questionhow to output text file in C++/MFC Pin
tunminshein10-Aug-07 0:56
tunminshein10-Aug-07 0:56 
AnswerRe: how to output text file in C++/MFC Pin
baerten10-Aug-07 1:08
baerten10-Aug-07 1:08 
AnswerRe: how to output text file in C++/MFC Pin
Hamid_RT10-Aug-07 1:11
Hamid_RT10-Aug-07 1:11 
AnswerRe: how to output text file in C++/MFC Pin
KarstenK10-Aug-07 1:14
mveKarstenK10-Aug-07 1:14 
AnswerRe: how to output text file in C++/MFC Pin
Anurag Gandhi10-Aug-07 1:23
professionalAnurag Gandhi10-Aug-07 1:23 
AnswerRe: how to output text file in C++/MFC Pin
jhwurmbach10-Aug-07 1:34
jhwurmbach10-Aug-07 1:34 
tunminster wrote:
...output file by MFC application. How can I do it ?


Like you do in C++ on every platform:
#include <string>
#include <iostream>
#include <fstream>
#include <iomanip> //for setw()
#include <cstdlib> //for exit()

int main() {

std::string FileName = "C:/temp/file.out";

std::ofstream file(FileName.c_str());

//file open?
if( !file)  {
  //No: Abort
  std::cerr << "Error opening file " << FileName << std::endl;
  exit( EXIT_FAILURE); // no need to close - file was never opened
}

const int i = 56; //arbitrary
const double j = 56.0003;

//Write to file
file << "Some play with Numbers \n";
file << std::setw(3) << i << " " << std::setw(2) << i << "\n";
file << std::setw(7) << j << " " << std::setw(4) << j << std::endl;

} //closes file automatically





Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words

Questionregarding statusbar display Pin
mirraa10-Aug-07 0:21
mirraa10-Aug-07 0:21 
AnswerRe: regarding statusbar display Pin
Hamid_RT10-Aug-07 0:38
Hamid_RT10-Aug-07 0:38 
AnswerRe: regarding statusbar display Pin
KarstenK10-Aug-07 2:21
mveKarstenK10-Aug-07 2:21 
QuestionHow to resolve this compile time error? Pin
Mushtaque Nizamani10-Aug-07 0:01
Mushtaque Nizamani10-Aug-07 0:01 
AnswerRe: How to resolve this compile time error? Pin
Cedric Moonen10-Aug-07 0:09
Cedric Moonen10-Aug-07 0:09 
GeneralRe: How to resolve this compile time error? Pin
Mushtaque Nizamani10-Aug-07 0:15
Mushtaque Nizamani10-Aug-07 0:15 
AnswerRe: How to resolve this compile time error? Pin
prasad_som10-Aug-07 0:10
prasad_som10-Aug-07 0:10 
AnswerRe: How to resolve this compile time error? Pin
Hamid_RT10-Aug-07 0:31
Hamid_RT10-Aug-07 0:31 
QuestionUnicode - MultiByte Pin
baerten9-Aug-07 22:51
baerten9-Aug-07 22:51 
AnswerRe: Unicode - MultiByte Pin
karle12-Aug-07 7:36
karle12-Aug-07 7:36 
QuestionDebug --> Exceptions in Visual Studio 2005 Pin
George_George9-Aug-07 22:00
George_George9-Aug-07 22:00 
AnswerRe: Debug --> Exceptions in Visual Studio 2005 Pin
baerten9-Aug-07 23:09
baerten9-Aug-07 23:09 
AnswerRe: Debug --> Exceptions in Visual Studio 2005 Pin
KarstenK10-Aug-07 2:19
mveKarstenK10-Aug-07 2:19 
QuestionHow to set Dialog size when resolution of computer changes Pin
wajape9-Aug-07 21:34
wajape9-Aug-07 21:34 
AnswerRe: How to set Dialog size when resolution of computer changes Pin
jhwurmbach9-Aug-07 21:52
jhwurmbach9-Aug-07 21:52 
AnswerRe: How to set Dialog size when resolution of computer changes Pin
Nelek9-Aug-07 22:01
protectorNelek9-Aug-07 22:01 
AnswerRe: How to set Dialog size when resolution of computer changes Pin
Hamid_RT10-Aug-07 0:39
Hamid_RT10-Aug-07 0:39 

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.