Click here to Skip to main content
15,919,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Interfacing Question Pin
Member 64882818-Nov-03 22:53
Member 64882818-Nov-03 22:53 
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 
i am trying to read a text file "japan.txt" which contains two coloumn of data
44,245
34,456
...
however when i try to convert each number from char to double the atof function
somehow doesn't work (c[i][j] = atoi(token);) (when i check what is c[i][j] it gives me 0)
any help greatly appreciated
thanks
barb

void tokenizer(){
char c[22][2]
char b[20];
char* token;

ifstream file;
file.open("japan.txt");

while (!file.eof()){
for (int i = 0; i< 21; i++) {
file.getline(b,' '); // read each line from file
int j = 0;
token = strtok(b," , ");
while (token != NULL){
//printf("dec1: %s\n", token);
c[i][j] = atoi(token); // convert from char to double
j++;
token= strtok(NULL," , ");

}
}}

}
GeneralRe: convert char to double Pin
GDavy18-Nov-03 21:39
GDavy18-Nov-03 21:39 
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 

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.