Thread: An access violation (segmentation fault) was raised in your program. HELP!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    A few things, right of the start in main(). You never check if you successfully open the file, then you attempt to use fscanf to read in strings in two variables (first, last) declared char.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by Subsonics View Post
    A few things, right of the start in main(). You never check if you successfully open the file, then you attempt to use fscanf to read in strings in two variables (first, last) declared char.
    Which just proves my point:

    "Compiles" does not mean "works" or "tested".

    You didn't even make sure you could read your names in properly, and then you went on to write another 250 lines of code!


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 01-13-2010, 11:16 PM
  2. access violation segmentation fault raised in your program
    By dinamit875 in forum C++ Programming
    Replies: 8
    Last Post: 04-23-2009, 11:44 AM
  3. Getting Access Violation (Segmentation Fault)
    By Brownie in forum C++ Programming
    Replies: 2
    Last Post: 09-26-2008, 11:43 AM
  4. Replies: 3
    Last Post: 07-17-2008, 08:45 AM
  5. access violation (segmentation fault)
    By MarlonDean in forum C++ Programming
    Replies: 7
    Last Post: 05-16-2008, 05:02 AM

Tags for this Thread