Click here to Skip to main content
15,921,694 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Are ISAPI filters still useful and how to use them in VS2008 Pin
Richard MacCutchan1-Jul-10 4:33
mveRichard MacCutchan1-Jul-10 4:33 
QuestionRe: Are ISAPI filters still useful and how to use them in VS2008 Pin
David Crow1-Jul-10 4:16
David Crow1-Jul-10 4:16 
AnswerRe: Are ISAPI filters still useful and how to use them in VS2008 Pin
Hristo-Bojilov1-Jul-10 6:31
Hristo-Bojilov1-Jul-10 6:31 
Questionhow to make dialog box as modal Pin
prerananit1-Jul-10 0:19
prerananit1-Jul-10 0:19 
AnswerRe: how to make dialog box as modal Pin
rp_suman1-Jul-10 0:38
rp_suman1-Jul-10 0:38 
QuestionOpen handle of drive Pin
john563230-Jun-10 23:58
john563230-Jun-10 23:58 
QuestionPrinter Resolution Pin
AbhiHcl30-Jun-10 21:59
AbhiHcl30-Jun-10 21:59 
QuestionRe: Printer Resolution Pin
CPallini30-Jun-10 22:32
mveCPallini30-Jun-10 22:32 
AnswerRe: Printer Resolution Pin
Niklas L30-Jun-10 22:44
Niklas L30-Jun-10 22:44 
QuestionAssertion Error in ownerdraw combobox.. Pin
AbhiHcl30-Jun-10 21:16
AbhiHcl30-Jun-10 21:16 
AnswerRe: Assertion Error in ownerdraw combobox.. Pin
KarstenK30-Jun-10 21:39
mveKarstenK30-Jun-10 21:39 
GeneralRe: Assertion Error in ownerdraw combobox.. Pin
AbhiHcl30-Jun-10 21:55
AbhiHcl30-Jun-10 21:55 
AnswerRe: Assertion Error in ownerdraw combobox.. Pin
Aescleal30-Jun-10 22:03
Aescleal30-Jun-10 22:03 
QuestionMessage Removed Pin
30-Jun-10 21:06
draghu30-Jun-10 21:06 
AnswerRe: C++ Version in Visual Studio 2005 Pin
CPallini30-Jun-10 21:17
mveCPallini30-Jun-10 21:17 
AnswerRe: C++ Version in Visual Studio 2005 Pin
Aescleal30-Jun-10 21:21
Aescleal30-Jun-10 21:21 
GeneralRe: C++ Version in Visual Studio 2005 Pin
draghu30-Jun-10 21:28
draghu30-Jun-10 21:28 
GeneralRe: C++ Version in Visual Studio 2005 Pin
Richard MacCutchan1-Jul-10 0:56
mveRichard MacCutchan1-Jul-10 0:56 
GeneralRe: C++ Version in Visual Studio 2005 Pin
draghu1-Jul-10 3:43
draghu1-Jul-10 3:43 
QuestionLibrary Creation Pin
shiv@nand30-Jun-10 19:28
shiv@nand30-Jun-10 19:28 
AnswerRe: Library Creation Pin
KingsGambit30-Jun-10 19:41
KingsGambit30-Jun-10 19:41 
GeneralRe: Library Creation Pin
shiv@nand30-Jun-10 19:50
shiv@nand30-Jun-10 19:50 
GeneralRe: Library Creation Pin
CPallini30-Jun-10 20:34
mveCPallini30-Jun-10 20:34 
AnswerRe: Library Creation Pin
Cedric Moonen30-Jun-10 20:36
Cedric Moonen30-Jun-10 20:36 
QuestionFile Opening Failed Pin
T.RATHA KRISHNAN30-Jun-10 18:26
T.RATHA KRISHNAN30-Jun-10 18:26 
Hi!
I've to read from an already existing text file. I've writen the following code.

if(countryCode == 0 && idBtn == 0)
 {
  ifstream myfile;
  char* line = " ";
  std::string filename = "E://Work//Data//playerdata.txt";
  
  myfile.open(filename.c_str(),ios_base::in);
  fstream test;
  test.open("E://Work//Data//test.txt", ios_base::out);
  if(!myfile.is_open())
  {
   printf("Opening File %s Failed!",filename.c_str());
  }
  
  while(!myfile.eof())
  {
   myfile.read(line, 1);
   //printf("%s", line);
   test.write(line, 150);
  }
  myfile.close();
  test.close();
  
  pManager->getGUIEnvironment()->addStaticText(L"Sachin's Details", rect<s32>(20, 50, 180, 80),false, true, m_pTestTab, -1, true);
 }

This prints only this statement "Opening File Failed!". Why is it printing like that?

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.