Real Noob Question

This is a discussion on Real Noob Question within the C Programming forums, part of the General Programming Boards category; I started C programming about 4 years ago and I was using DJGPP. Needless to say that was a long ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    5

    Real Noob Question

    I started C programming about 4 years ago and I was using DJGPP. Needless to say that was a long time ago and I'm starting up again. However, now I have WinXP and DJGPP doesn't seem to want to work. I've downloaded Borland 6.0*, now this seems like a pretty good program, but I can't seem to make a simple C program. Is Borland only for C++? I just want to get a good compiler so I can start learning again, any suggestions?

    * Phrase edited out here by Kermi3 due to program piracy

  2. #2
    Registered User mlupo's Avatar
    Join Date
    Oct 2001
    Posts
    72
    What is the problem you are encountering? Not that I can help you with Boreland, but if you ask a better question, you'll most likely get a better answer.


    Good luck mahn!
    Mike
    NEVER PET YOUR DOG WHILE IT'S ON FIRE!

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    5
    Well, I guess my question is, can I learn to program C like I started many years ago in DOS, or does borland only do C++. I can't figure out what to use in Borland. I just want to learn dammit

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    137
    you can program either C or C++ in borland.

    What simple program can't you get working? If you post the code we could check it for you to see if its a syntax error.
    Last edited by crag2804; 09-30-2002 at 05:25 PM.
    http://uk.geocities.com/ca_chorltonkids

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    5
    Originally posted by crag2804
    you can program either C or C++ in borland.

    What simple program can't you get working? If you post the code we could check it for you to see if its a syntax error.
    I mean I can't figure out how to get it working. You select new, then c file right? Then just type in a simple program. uhm, I guess this for example

    #include <stdio.h>

    void main()
    {
    printf("Hello world");
    }

    Then I build the project and when I go to run it...Nothing happens. The screen blips for a sec but I see no output. Sometimes I get a blank form screen that pops up.

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by ripxtide
    #include <stdio.h>

    void main()
    {
    printf("Hello world");
    }
    When I compile this code, I get the following:

    "Danger Will Robinson! Error on line 3!"

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

  7. #7
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Originally posted by quzah
    When I compile this code, I get the following:

    "Danger Will Robinson! Error on line 3!"

    Quzah.
    Rough interpretation: void main() must DIEEEEE!!!!!!
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  8. #8
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Where is Salem's avatar when you need it.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  9. #9
    Registered User
    Join Date
    Sep 2002
    Posts
    1

    Thumbs up

    Ripxtide,
    If you are still waiting for an answer on this well here goes. You can use the c++ compiler and it will do a respectable job on you work.

  10. #10
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by expediforce911
    Ripxtide,
    If you are still waiting for an answer on this well here goes. You can use the c++ compiler and it will do a respectable job on you work.
    ... but that doesn't make the code correct, nor will it help with the disappearing console window when (s)he executes the program.

    (Hint: you need to pause the program at the end of it.)
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  11. #11
    Registered User
    Join Date
    Sep 2002
    Posts
    5
    Okay, well how about this

    #include <stdio.h>
    #include <dos.h>

    int main()
    {
    printf("Hey");

    delay(100);

    return 0;

    }

    I tried this and I still get nothing. Give me some output damnit!


    Originally posted by Hammer
    ... but that doesn't make the code correct, nor will it help with the disappearing console window when (s)he executes the program.

    (Hint: you need to pause the program at the end of it.)

  12. #12
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Read about pausing your program in the faq. (... with getch() )

    Alternatively, get to a DOS prompt, and navigate your way to where your program is, and run it from the command line. The window won't close at all if you do it this way.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  13. #13
    Registered User
    Join Date
    Sep 2002
    Posts
    5
    Forget it, I just downloaded dev-c++ and everything is cool. Now I can program.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another noob question
    By clb2003 in forum C Programming
    Replies: 4
    Last Post: 02-12-2009, 01:28 PM
  2. Noob printf question
    By lolguy in forum C Programming
    Replies: 3
    Last Post: 12-14-2008, 08:08 PM
  3. Real Noob question
    By Dark Greek in forum C++ Programming
    Replies: 8
    Last Post: 09-09-2007, 07:49 PM
  4. What's the real question?
    By Salem in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 07-18-2007, 09:32 PM
  5. Noob question (redeclaring a array)
    By Demon.killer in forum C Programming
    Replies: 8
    Last Post: 10-21-2006, 01:06 PM

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