No, i've tried that of course (removing all the \t, but they have helped me earlier in the parsing of this file, where sscanf did not see the whitespace). using an int as second there crashes actually,
hm.. maybe i should allocate memory for it, even though i thought it just would change value every time it ran, as in any other language.
User Profile
Collapse
-
sscanf vs. anything!
You would think this line would be 'easy' to parse with sscanf
"*MESH_VERT EX 0 -36.9033 0.4202 31.5154"
sscanf(line,"%s %i\t %f\t %f\t %f",&tmpline,vr txnum,&mesh[objnr].points1,&mesh[objnr].points2,&mesh[objnr].points3);
there are whitespaces between the floats, that's why i used \t
i do get the correct string (&tmpline), but the rest is just strange... -
typedef struc in C
Hi! It's been quite a while since i've had to write something in C, and i have question. This is for a 3d object parser and i then have two structs.
typedef struct {
int numfaces,numpoi nts;
int *face1,*face2,* face3;
float *points1,*point s2,*points3;
float *pointnrm1,*poi ntnrm2,*pointnr m3;
float *tmapx,*tmapy;
}meshes;
typedef struct {
char...
No activity results to display
Show More
Leave a comment: