DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   Best free C/C++ compiler for a newbie? (http://www.daniweb.com/forums/thread19944.html)

Cup of Squirrel Mar 10th, 2005 5:00 pm
Best free C/C++ compiler for a newbie?
 
Ok, time to get off my ass and learn C and C++. However, I'm having a bit of trouble finding a free compiler; I'm a newbie so it needs to have a friendly and explanatory GUI if possible. Just post name and/or link, thanks :D

Stack Overflow Mar 10th, 2005 5:03 pm
Re: Best free C/C++ compiler for a newbie?
 
Hello,

I would recommend Bloodshed Dev-C++ for C++ programming.

If you want to compile C code, I would suggest using a C compiler such as GCC. I'm un-aware of any free available IDE envrionments for the C language. Though you may be able to compile C code in Dev-C++. I've never tried, though.


- Stack Overflow

Narue Mar 10th, 2005 5:20 pm
Re: Best free C/C++ compiler for a newbie?
 
>Though you may be able to compile C code in Dev-C++.
You can. You just need to be sure that the source file extension is .c instead of .cpp.

Cup of Squirrel Mar 11th, 2005 11:58 am
Re: Best free C/C++ compiler for a newbie?
 
Ok, downloaded and found an online tutorial and I've already hit a bit of trouble:

// my first program in C++

#include <iostream.h>

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

Thats the program. I compile and run as a .cpp. It seems to compile fine ("hello.exe" appears in folder), but when it comes to running, it shows the DOS box to display the text, and immediatly (spelling?) closes. The log displays something like this:

In file included from C:/Dev-Cpp/include/c++/3.3.1/backward/iostream.h:31,
                from /my folder etc/hello.cpp:3:
C:/Dev-Cpp/include/c++/3.3.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.

Execution terminated
Compilation successful

What am I doing wrong :S

Stack Overflow Mar 11th, 2005 12:05 pm
Re: Best free C/C++ compiler for a newbie?
 
Hello,

You may want to try:
// my first program in C++

#include <iostream>
using namespace std;

int main (void) {
        // Display text
        cout << "Hello World!" << endl;
        // Pause screen
        cin.get();
        // Terminate program
        return 0;
}
The function get() extracts a character from the stream and returns its value. It's a good way of pausing the console screen.


- Stack Overflow

hollystyles Mar 11th, 2005 1:00 pm
Re: Best free C/C++ compiler for a newbie?
 
I've used Bloodshed too, very good for beginners.

If you like bells and whistles Microsofts EVT C++ is free from their site, It's designed to compile for programming mobile devices like smartphones or pocket PC's. I've done a couple of tools for my Pocket PC on it, it's a great toy !

Cup of Squirrel Mar 11th, 2005 3:35 pm
Re: Best free C/C++ compiler for a newbie?
 
Ah I was looking at programming for the Palm OS as I have a PalmOne Zire, so I might look into that :D

vegaseat Mar 11th, 2005 8:27 pm
Re: Best free C/C++ compiler for a newbie?
 
Pelles C is free and comes with support for Pocket PC and Smartphones. It has a great IDE and helpfile!

Download it from:
http://smorgasbordet.com/pellesc/index.htm

murschech Mar 20th, 2005 2:05 am
Re: Best free C/C++ compiler for a newbie?
 
I've been following this thread and I also downloaded the Bloodshed compiler. Can you tell me where that online tutorial is?

1o0oBhP Mar 20th, 2005 8:07 pm
Re: Best free C/C++ compiler for a newbie?
 
I would also recommend DevC++, also DJGPP is useful if you want to program old VGA graphics.


All times are GMT -4. The time now is 3:21 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC