Click here to Skip to main content
16,017,297 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 2:29
David Crow4-Jun-07 2:29 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 4:36
GatoFedorento474-Jun-07 4:36 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 4:48
David Crow4-Jun-07 4:48 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 5:30
GatoFedorento474-Jun-07 5:30 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 5:38
David Crow4-Jun-07 5:38 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 5:46
GatoFedorento474-Jun-07 5:46 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 5:49
David Crow4-Jun-07 5:49 
AnswerRe: problem reading file in C++ newbie here ;) Pin
David Crow3-Jun-07 16:44
David Crow3-Jun-07 16:44 
GatoFedorento47 wrote:
strncpy(vec,line.c_str(),3);


This is guaranteed to fail. The variable vec can only hold only character plus the '\0' terminator.

GatoFedorento47 wrote:
aux=atoi(&vec[0]);


Is the same as:

aux = atoi(vec);
escolha_cod() returns nothing but 47. Is this intentional?

GatoFedorento47 wrote:
ifstream myfile ("codigo.txt");


Shouldn't you be specifiying a path with this?


"A good athlete is the result of a good and worthy opponent." - David Crow

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento473-Jun-07 19:47
GatoFedorento473-Jun-07 19:47 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 2:42
David Crow4-Jun-07 2:42 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 6:01
GatoFedorento474-Jun-07 6:01 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 6:37
David Crow4-Jun-07 6:37 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 6:48
GatoFedorento474-Jun-07 6:48 
QuestionRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 6:58
David Crow4-Jun-07 6:58 
AnswerRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 7:20
GatoFedorento474-Jun-07 7:20 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 7:24
David Crow4-Jun-07 7:24 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento474-Jun-07 7:27
GatoFedorento474-Jun-07 7:27 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow4-Jun-07 7:32
David Crow4-Jun-07 7:32 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento4713-Jun-07 7:33
GatoFedorento4713-Jun-07 7:33 
GeneralRe: problem reading file in C++ newbie here ;) Pin
David Crow13-Jun-07 7:44
David Crow13-Jun-07 7:44 
GeneralRe: problem reading file in C++ newbie here ;) Pin
GatoFedorento4713-Jun-07 7:48
GatoFedorento4713-Jun-07 7:48 
QuestionRe: problem reading file in C++ newbie here ;) Pin
David Crow13-Jun-07 7:29
David Crow13-Jun-07 7:29 
Questionwhat is the secret of stepping through an stepping over MFC application ? Pin
Software_Specialist3-Jun-07 10:43
Software_Specialist3-Jun-07 10:43 
AnswerRe: what is the secret of stepping through an stepping over MFC application ? Pin
Christian Graus3-Jun-07 11:20
protectorChristian Graus3-Jun-07 11:20 
QuestionHow to populate a CBitmap correctly Pin
C. Tam3-Jun-07 9:46
C. Tam3-Jun-07 9:46 

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.