Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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?
AnswerRe: File Opening Failed Pin
«_Superman_»30-Jun-10 18:46
professional«_Superman_»30-Jun-10 18:46 
QuestionRe: File Opening Failed Pin
T.RATHA KRISHNAN30-Jun-10 18:51
T.RATHA KRISHNAN30-Jun-10 18:51 
QuestionRe: File Opening Failed Pin
«_Superman_»30-Jun-10 18:54
professional«_Superman_»30-Jun-10 18:54 
AnswerRe: File Opening Failed Pin
T.RATHA KRISHNAN30-Jun-10 19:00
T.RATHA KRISHNAN30-Jun-10 19:00 
GeneralRe: File Opening Failed Pin
KingsGambit30-Jun-10 19:20
KingsGambit30-Jun-10 19:20 
GeneralRe: File Opening Failed Pin
T.RATHA KRISHNAN30-Jun-10 19:26
T.RATHA KRISHNAN30-Jun-10 19:26 
GeneralRe: File Opening Failed Pin
KingsGambit30-Jun-10 19:49
KingsGambit30-Jun-10 19:49 
GeneralRe: File Opening Failed Pin
T.RATHA KRISHNAN30-Jun-10 20:00
T.RATHA KRISHNAN30-Jun-10 20:00 
GeneralRe: File Opening Failed Pin
Richard MacCutchan30-Jun-10 21:38
mveRichard MacCutchan30-Jun-10 21:38 
AnswerRe: File Opening Failed Pin
Aescleal30-Jun-10 21:16
Aescleal30-Jun-10 21:16 
AnswerRe: File Opening Failed Pin
David Crow1-Jul-10 4:22
David Crow1-Jul-10 4:22 
QuestionFILE_NOTIFY_CHANGE_SIZE and FindFirstChangeNotification behavior in W7 and XP Pin
auriga1930-Jun-10 12:18
auriga1930-Jun-10 12:18 
AnswerRe: FILE_NOTIFY_CHANGE_SIZE and FindFirstChangeNotification behavior in W7 and XP Pin
«_Superman_»30-Jun-10 18:48
professional«_Superman_»30-Jun-10 18:48 
GeneralRe: FILE_NOTIFY_CHANGE_SIZE and FindFirstChangeNotification behavior in W7 and XP Pin
auriga191-Jul-10 5:59
auriga191-Jul-10 5:59 
QuestionRe: FILE_NOTIFY_CHANGE_SIZE and FindFirstChangeNotification behavior in W7 and XP Pin
David Crow1-Jul-10 8:15
David Crow1-Jul-10 8:15 
AnswerRe: FILE_NOTIFY_CHANGE_SIZE and FindFirstChangeNotification behavior in W7 and XP Pin
auriga191-Jul-10 9:22
auriga191-Jul-10 9:22 
QuestionRe: FILE_NOTIFY_CHANGE_SIZE and FindFirstChangeNotification behavior in W7 and XP Pin
David Crow1-Jul-10 10:00
David Crow1-Jul-10 10:00 

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.