User Profile

Collapse

Profile Sidebar

Collapse
babayaga
babayaga
Last Activity: Dec 5 '07, 01:46 PM
Joined: Nov 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • babayaga
    replied to sscanf vs. anything!
    in C
    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.
    See more | Go to post

    Leave a comment:


  • babayaga
    started a topic sscanf vs. anything!
    in C

    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...
    See more | Go to post

  • babayaga
    started a topic typedef struc in C
    in C

    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...
    See more | Go to post
No activity results to display
Show More
Working...