Thread: Compiler program problem

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    15

    Compiler program problem

    I am fairly new to C programming and have been using a free compiler recommended by my instructor, called C-Free Standard 4.0.

    I have been experiencing a problem where when I type code for my homework problems, and work out all my errors, then save the program, from then on when I run the program new errors that didn't exist before suddenly appear and jack up my program.

    If I change nothing, cut and paste the code to a new unsaved/untitled sheet, I can run it (Press F5) without error as before. But as soon as I save that the same thing occurs.

    These symptoms appeared weirdly. I had a program working, then saved it, turned it in electronically, and when it was graded the instructor commented that he had parse errors. They did not appear for me. The next assignment, I was having issues with an error that wouldn't go away, until I saved it. Then that error went away and was replaced with others that I was able to resolve. but once again, I submitted the assignment and the instructor had errors. When I reopened the program, I too had the errors. The next assignment began regular, repeatable problems describe in paragraph 2 and 3 above. My instructor had me re-submit the errorring programs as word documents so he could look at the code, which he found no problems with, and copied it into his compiler with no errors.

    I've tried deleting and re-installing the compiler a couple of times, with no change. I've run virus scans and found nothing.

    Any idea what's happening?

  2. #2
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314
    Can you post minimal code that demonstrates your problem?
    And compiler error.

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    First of all C-Free is an IDE (and not a very good one) not a compiler.

    What compiler are you using with it?

    As already requested, show us code samples (before and after) if necessary, to demonstrate the problem...

    Finally you may want to have a talk with your teacher about his choices in coding tools... If the "recommended" tools are causing problems, it's time to rethink the whole thing.

  4. #4
    Registered User
    Join Date
    Mar 2011
    Posts
    15
    I don't know what the difference between an IDE and a compiler is. C-Free Standard was recommended by the instructor (this is an online course). It was working fine for the first few programs. Then the problems that eventually manifested are 'parse errors' I can't give you a before and after code sample, because as I said, I change nothing in the code except to take the whole thing copy and paste it to a new screen, and it works just fine until I save it. The problems occur with various code. These are simple homework assignments. "write a program that does....." usually around 30 lines or less.
    Sorry I can't give anymore info than I already provided.

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    An IDE is the integrated development environment, so it includes an editor, a button for help on C subjects, a run option, a compile option, a link option, a build option for projects, as well as the normal open file, save file, and save as functions, and quit, of course.

    Only the compiler actually compiles your code. The IDE just includes the editor and the links to control all the above (and much more).

  6. #6
    Registered User
    Join Date
    Mar 2011
    Posts
    15
    Okay, So now to make it more confusing or more clear. A new problem occurred. I opened up C-Free and all the menus were in jacked up symbols instead of English. I closed and reopened a few times, it wouldn't clear. I ended up re-installing it again. Then menus were normal. Opened up my most recent assignment I'm working on, and of course 'parse error before *" on one of the lines. Copy and paste the code to a new project screen and it runs like a champ (at least the parts I've done so far, still need to finish though). Grr. I'm on my last assignment, and final exam is next week. Any suggestions?

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    It sounds like your IDE is either buggy, or incompatible with your operating system. I've never used it, so have no idea how to fix it. Frankly, I'm not there is a fix you can make for it.

    I have recently been very happy with Pelles C (free and available for a variety of different systems). The main thing is it's intuitive IDE. Everything is just where you'd expect it to be. Compiler is included, and has worked well for me. They have beta or pre-release versions, but you want to get the latest NON beta version, naturally.

    You spend two hours with Pelles C and you'll be smiling all the way to the finals, and never look back to Free C.

  8. #8
    Registered User
    Join Date
    Mar 2011
    Posts
    15
    Well I didn't really want to learn to work a new program this late in the game, but I'll give it a shot. Can't hurt. Thanks for the info.
    If anyone else has more input to my problem, let me know.

  9. #9
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    I am certain you will be glad you did, very soon! Wouldn't have recommended it, otherwise.

  10. #10
    Registered User
    Join Date
    Mar 2011
    Posts
    15
    Well so far you are right on with it. I like the lines connecting the braces. And I can definitely understand the error codes more clearly. I struggled a little with figuring out how to get my stuff to run, but once I did, no problems.

    Thanks for that tip. Too bad it wasn't at the beginning of class vice near the end. I'll definitely recommend it to the instructor, and that he recommend it vice C-Free.
    Now, If I could just get the line counting thing to work.......

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wordcounting program, problem with filereading.
    By Hemulen in forum C Programming
    Replies: 11
    Last Post: 11-06-2010, 02:20 PM
  2. [NEED HELP] I just can't solve this program problem!
    By frodonet in forum C Programming
    Replies: 7
    Last Post: 09-23-2007, 02:44 PM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. Inheritance and Dynamic Memory Program Problem
    By goron350 in forum C++ Programming
    Replies: 1
    Last Post: 07-02-2005, 02:38 PM