Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Interfacing Question Pin
Johnny ²19-Nov-03 1:03
Johnny ²19-Nov-03 1:03 
GeneralRe: Interfacing Question Pin
Member 64882828-Nov-03 17:21
Member 64882828-Nov-03 17:21 
QuestionHow to set the original size of a window? Pin
julych18-Nov-03 21:20
julych18-Nov-03 21:20 
AnswerRe: How to set the original size of a window? Pin
Peak18-Nov-03 22:41
Peak18-Nov-03 22:41 
AnswerRe: How to set the original size of a window? Pin
Shehzad Salim18-Nov-03 22:48
Shehzad Salim18-Nov-03 22:48 
GeneralSlider problem Pin
Jose Vicente18-Nov-03 21:00
Jose Vicente18-Nov-03 21:00 
Generalconvert char to double Pin
barbaraokupna18-Nov-03 20:39
barbaraokupna18-Nov-03 20:39 
GeneralRe: convert char to double Pin
GDavy18-Nov-03 21:39
GDavy18-Nov-03 21:39 
Hello Barbara,

I don^t know if it is intentional but the code you send seems kind of erroneous.

first your array c is of type char, and yet you wanted to perform the line:
c[i][j] = atof(token);
char is one byte long, return value of atof is 8 bytes long...
also atoi returns integer, sizeof int on my station is still 4 bytes.
So you would lose precision because of truncation (eg all strings representing a value bigger then 256(in the atoi case) would not be converted correctly), in the atof case simply all strings would be incorrect.
Second you presume the line will never contain more then 2 tokens (which is your right offcourse), but if I were you(which I`m not) I`ld make sure that j never gets bigger then 2.
Third, you might want to check if your txt file is ANSI format or Unicode, make sure it is ANSI if you want to work with normal char strings, othewise use wide character strings.
Fourth, I'm not sure about that one but the getline function doesn^t it take as second parameter the size of the buffer?....


Anyway, I hope these remarks may help you.

Greetz,
Davy
GeneralRe: convert char to double Pin
David Crow19-Nov-03 3:38
David Crow19-Nov-03 3:38 
GeneralAsk for Help!! Pin
denny7518-Nov-03 20:23
denny7518-Nov-03 20:23 
GeneralRe: Ask for Help!! Pin
Shehzad Salim18-Nov-03 21:15
Shehzad Salim18-Nov-03 21:15 
GeneralRe: Ask for Help!! Pin
Mike Dimmick19-Nov-03 0:38
Mike Dimmick19-Nov-03 0:38 
GeneralSystray Pin
margis18-Nov-03 19:04
margis18-Nov-03 19:04 
GeneralRe: Systray Pin
Ivor S. Sargoytchev18-Nov-03 19:45
Ivor S. Sargoytchev18-Nov-03 19:45 
GeneralRe: Systray Pin
Peak18-Nov-03 19:55
Peak18-Nov-03 19:55 
QuestionHow to call interrupt function Pin
FlyingDancer18-Nov-03 18:58
FlyingDancer18-Nov-03 18:58 
AnswerRe: How to call interrupt function Pin
Peak18-Nov-03 19:36
Peak18-Nov-03 19:36 
GeneralRe: How to call interrupt function Pin
FlyingDancer19-Nov-03 0:32
FlyingDancer19-Nov-03 0:32 
GeneralRe: How to call interrupt function Pin
Mike Dimmick19-Nov-03 1:44
Mike Dimmick19-Nov-03 1:44 
GeneralRe: How to call interrupt function Pin
Peak19-Nov-03 2:47
Peak19-Nov-03 2:47 
GeneralRe: How to call interrupt function Pin
FlyingDancer19-Nov-03 3:09
FlyingDancer19-Nov-03 3:09 
GeneralDirectshow error w/ SetNotifyWindow Pin
georgiek5018-Nov-03 18:15
georgiek5018-Nov-03 18:15 
GeneralRe: Directshow error w/ SetNotifyWindow Pin
Ivor S. Sargoytchev18-Nov-03 19:28
Ivor S. Sargoytchev18-Nov-03 19:28 
GeneralRe: Directshow error w/ SetNotifyWindow Pin
georgiek5018-Nov-03 19:57
georgiek5018-Nov-03 19:57 
GeneralATL & DHTML Pin
Leesen18-Nov-03 17:40
Leesen18-Nov-03 17:40 

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.