🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2330

fscanf problem

#2330
From: sg7248613
Date: Tue, 19 Mar 1996 12:46
20 lines
1364 bytes
I have been trying to read a section of data from a file for days.

The data segment goes like this:
    .....
    Patch norm0 4 { { 0 -1 0 } { 0 -1 0 } { 0 -1 0 } { 0 -1 0 } }
    Patch vert0 4 { { 0 1 0 } { 1 1 0 } { 1 1 1 } { 0 1 1 } }.
    .....
My actual code segment is as follows:

fscanf(meshf, "    Patch %s %d { { %f %f %f } { %f %f %f } { %f %f %f }\
            { %f %f %f } }\n    Patch %s %d { { %f %f %f } { %f %f %f }\
            { %f %f %f } { %f %f %f } }\n", pptr->nname, &(pptr->numVert),
            &tmpf[0], &tmpf[1], &tmpf[2], &tmpf[3], &tmpf[4], &tmpf[5],
            &tmpf[6], &tmpf[7], &tmpf[8], &tmpf[9], &tmpf[10], &tmpf[11],
            pptr->vname, &tmpi,
            &tmpg[0], &tmpg[1], &tmpg[2], &tmpg[3], &tmpg[4], &tmpg[5],
            &tmpg[6], &tmpg[7], &tmpg[8], &tmpg[9], &tmpg[10], &tmpg[11]);

The read of the first line is OK. But I can't scanf the second line
successfully. Could anyone please enlighten me on this? Thank you!
Technical Details
Message-ID: <4imaao$dsi@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: sg7248613@omega.ntu.ac.sg
Newsgroups: comp.lang.c.moderated
Subject: fscanf problem
Date: 19 Mar 1996 06:46:16 -0600
Organization: Nanyang Technological University - Singapore
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4imaao$dsi@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com