Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to read names from a file and sort them in alphabetical order Pin
David Crow24-Feb-09 9:47
David Crow24-Feb-09 9:47 
AnswerRe: How to read names from a file and sort them in alphabetical order Pin
tyr200025-Feb-09 1:40
tyr200025-Feb-09 1:40 
AnswerRe: How to read names from a file and sort them in alphabetical order Pin
raeiko25-Feb-09 11:24
raeiko25-Feb-09 11:24 
Questionusing tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
mrby12324-Feb-09 7:37
mrby12324-Feb-09 7:37 
AnswerRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
Stuart Dootson24-Feb-09 8:03
professionalStuart Dootson24-Feb-09 8:03 
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
mrby12324-Feb-09 8:07
mrby12324-Feb-09 8:07 
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
Stuart Dootson24-Feb-09 8:28
professionalStuart Dootson24-Feb-09 8:28 
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
mrby12324-Feb-09 9:04
mrby12324-Feb-09 9:04 
You are a good coach.

Thanks tons. It works now. Do you see any improvement from the following code. Please point out to me.
Thanks alots


char string[80]=" ";
char * dummy;
char seps[] = ",";
for (i=0;i<nhole;i++)
{
// fscanf(f_ptr1,"%i,%i,%i,%s,%f,%f,%f\n",&kdum[i],&nlinks[i],&ndih[i],buffer,&cos_xx[i],&cos_yy[i],&cos_zz[i]);

fscanf(f_ptr1,"%s\n",string);

kdum[i] = atol(strtok(string, seps));
nlinks[i] = atol(strtok(NULL, seps));
ndih[i] = atol(strtok(NULL, seps));
dummy = strtok(NULL, seps);
cos_xx[i] = atof(strtok(NULL, seps));
cos_yy[i] = atof(strtok(NULL, seps));
cos_zz[i] = atof(strtok(NULL, seps));

} Smile | :)
//
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
Stuart Dootson24-Feb-09 9:14
professionalStuart Dootson24-Feb-09 9:14 
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
mrby12324-Feb-09 12:17
mrby12324-Feb-09 12:17 
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
Stuart Dootson24-Feb-09 12:44
professionalStuart Dootson24-Feb-09 12:44 
GeneralRe: using tokenize to extract numbers and strings from a mixture of number and characters comma-delimited Pin
mrby12324-Feb-09 12:49
mrby12324-Feb-09 12:49 
QuestionControlling Serial and parallel ports Pin
isolanya24-Feb-09 6:06
isolanya24-Feb-09 6:06 
QuestionRe: Controlling Serial and parallel ports Pin
Roger Stoltz24-Feb-09 6:26
Roger Stoltz24-Feb-09 6:26 
QuestionIs crystal Report 7.0 supports in VS2008 Pin
P A N K A J24-Feb-09 4:49
P A N K A J24-Feb-09 4:49 
QuestionRe: Is crystal Report 7.0 supports in VS2008 Pin
Rajesh R Subramanian24-Feb-09 5:10
professionalRajesh R Subramanian24-Feb-09 5:10 
AnswerRe: Is crystal Report 7.0 supports in VS2008 Pin
P A N K A J24-Feb-09 5:13
P A N K A J24-Feb-09 5:13 
GeneralRe: Is crystal Report 7.0 supports in VS2008 Pin
Rajesh R Subramanian24-Feb-09 5:16
professionalRajesh R Subramanian24-Feb-09 5:16 
QuestionVRML in OpenGL and MFC Pin
Pompeyo24-Feb-09 3:48
Pompeyo24-Feb-09 3:48 
AnswerRe: VRML in OpenGL and MFC Pin
Stuart Dootson24-Feb-09 3:58
professionalStuart Dootson24-Feb-09 3:58 
GeneralRe: VRML in OpenGL and MFC Pin
Pompeyo24-Feb-09 4:06
Pompeyo24-Feb-09 4:06 
GeneralRe: VRML in OpenGL and MFC Pin
Stuart Dootson24-Feb-09 4:14
professionalStuart Dootson24-Feb-09 4:14 
GeneralRe: VRML in OpenGL and MFC Pin
Pompeyo24-Feb-09 4:24
Pompeyo24-Feb-09 4:24 
GeneralRe: VRML in OpenGL and MFC Pin
Stuart Dootson24-Feb-09 5:23
professionalStuart Dootson24-Feb-09 5:23 
GeneralRe: VRML in OpenGL and MFC Pin
Pompeyo24-Feb-09 23:02
Pompeyo24-Feb-09 23:02 

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.