Free compile...

Firkat54

Newbie
Joined
Mar 19, 2005
Messages
236
Reaction score
0
Since no one seems to be active on the General Editing forum, I thought I'd ask here.


Firkat54 said:
Sorry to dig up such an old topic, but does anyone know where to get any other good C++ compilers for free?

I currently have the bloodshed.net CPP compiler (newest version) but for some reason it doesn't recognize
Code:
return 0;
anymore (just stopped working after about a month) so I haven't gotten very far in learning(between school and socializing).

I also have an old command line version of one of borland's compilers. I would prefer not to have this type, as I get lost in the interface, and I find GUI based compilers much easyer. I've been trying to get my hands on Turbo C++ for a long time but have had no luck in getting it for a cheap price.

So if anyone can recommend a good free C++ compiler for me, I would be very grateful.

P.S. Sorry if there are already posts regarding this topic, but this was the only one that came up in the search.


Sorry bout the spam, but no one has responded to the other post, and I figure this would have been the better place to post in the first place.
 
umm unless your really experienced you need to buy the visual studio 2003. but its only like 80 quid.
 
What error message does it throw up? You might have made your function a void or a bool, or something, in which you need to either return NULL, or return a value that matches the function type.

-Angry Lawyer
 
Angry Lawyer said:
What error message does it throw up? You might have made your function a void or a bool, or something, in which you need to either return NULL, or return a value that matches the function type.

-Angry Lawyer
No error, it just imediately closes the program. When I first started learning, the "Hello World" program worked flawlessly, but now it just closes before you can see the output.

The code used before and after:
Code:
#include <iostream.h>

int main ()
{
  cout << "Hello World!";
  return 0;
}

I've tried using this as well.. It does work, but I'm guessing it won't work later:
Code:
#include <iostream.h>

int main ()
{
  cout << "Hello World!";
  cin.get()
  return 0;
}

It also seems to dislike 'double' variables.

If you guys could help me fix it that would be great as well. Also, just so you know, I'm not planning on modding source, I'm learning just because I love coding, and this is the only place I could think of that people wouldn't be completely moronic about new cpp programmers.
 
You're program runs fine, it's just that it runs so fast and return 0; means it runs succesfully then exits immediately.

What you can do to keep it open is to execute it from the command line

There are a few othwr ways to keep it open like using cin.get() function or system "PAUSE" you'll have to check your c++ references on proper usage of those.
 
add

Code:
cout << lawl;
at the end of your program.

and you'll see the entire thing :P
 
goalied00d said:
You're program runs fine, it's just that it runs so fast and return 0; means it runs succesfully then exits immediately.

What you can do to keep it open is to execute it from the command line

There are a few othwr ways to keep it open like using cin.get() function or system "PAUSE" you'll have to check your c++ references on proper usage of those.

Ok, thanks, but then can someone explain why it paused before? Or is it just some freak mistake? And also, why would they put that in so many tutorials, if it doesn't work properly(maybe I phrased that wrong, if it doesn't work like they say it should)?
 
You probably accidentally changed an option on your computer to close DOS programs automatically when they've finished running.
Nothings wrong with your code, or your compiler.

-Angry Lawyer
 
Back
Top