reading in a file

This is a discussion on reading in a file within the C Programming forums, part of the General Programming Boards category; Hey... I am having a problem. If I just fscanf a file, with no operations inside, there is no problem. ...

  1. #1
    Ron
    Ron is offline
    Registered User
    Join Date
    May 2006
    Posts
    151

    reading in a file

    Hey...
    I am having a problem. If I just fscanf a file, with no operations inside, there is no problem. But if I have some operations inside, and I type in a statement like printf(test)just after entering the file. Even the statement is not printed, and I get a segmentation fault. What could be the causes?

  2. #2
    Chinese pâté foxman's Avatar
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    404
    What do you mean by "fscanf a file, with no operations inside" ?

    And you should post some code if you want some help. Your code is certainly broken.
    I hate real numbers.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Your syntax has confused the program. Post your code, but do look at the proper syntax for fscanf() and printf().

  4. #4
    Ron
    Ron is offline
    Registered User
    Join Date
    May 2006
    Posts
    151
    I wanted to delete this post. Ive already fix the issue.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  4. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 09:46 AM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21