Newbie needs help!

This is a discussion on Newbie needs help! within the C++ Programming forums, part of the General Programming Boards category; I'm new to programming, and I am using a Sams book to teach myself C++. The compiler that came with ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    1

    Unhappy Newbie needs help!

    I'm new to programming, and I am using a Sams book to teach myself C++. The compiler that came with it is called Bloodshed. My problem is, I can't see any of my programs' output. I write the code and I click "compile and run" and a window comes up telling me that I have no errors. But no window ever comes up that shows the output, e.g. "Hello World!" or whatever it is the program is supposed to do. I don't even see a DOS window flicker or anything. I put a cin.get() line in, and even cut and pasted other people's posted code just to see if I could get it to work, and I get nothing. I find C++ really exciting, but I'm banging my head against a wall here. It's probably something really simple, so help me out, please.

    Oh yeah, and I can't figure out how to make the program into a stand-alone .exe either.

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    311
    If you have the project set to "console application" it should run, the default is a stand alone exe. Open a dos box, cd to the directory where your cpp file lives type "g++ filename.cpp -o filename" then, assuming no complaints, you should see filename.exe in the same directory. The default windows application project should also produce a pointless window. If you delete winmain, but keep main I have no idea what happens but that might do what you describe. Do you see copies of your programm just sitting there in task manager?

  3. #3
    Stinking it up. StinkyRyan's Avatar
    Join Date
    Jun 2004
    Posts
    61
    Ok first lets get some information on you, what operating system are you using, is bloodshed uptodate, and lets see the code. Remember to put it into code tages [ code] blah blah [ /code ] and just checking you know to go on the menu to Execute and then to compile to make it then go to Execute and then to Run to run it? The stand alone .exe will be in the folder the code was compiled in.
    Because I can't.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. newbie: array question :(
    By cstudent in forum C Programming
    Replies: 2
    Last Post: 04-09-2008, 06:46 AM
  2. getting to grips with allegro and ms vc++ (newbie)
    By jimjamjahaa in forum C++ Programming
    Replies: 4
    Last Post: 11-18-2005, 06:49 PM
  3. Newbie in problem with looping
    By nrain in forum C Programming
    Replies: 6
    Last Post: 11-05-2005, 11:53 AM
  4. Some help for a newbie?
    By Ilmater in forum C++ Programming
    Replies: 23
    Last Post: 04-19-2004, 07:44 PM
  5. Newbie Game Develpoers Unite!
    By Telenosis in forum Game Programming
    Replies: 10
    Last Post: 06-22-2002, 02:02 PM

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