Jump to content

c++ compilers


Recommended Posts

I'm looking to get into programming, possibly pretty seriously, though I don't know too much as is. What's a good compiler for C++? I'm willing to pay for it, but if you have free options, those are cool, too.

Link to comment
Share on other sites

I recommend learning C before C++ though.

 

Others have told me not to, because it's so different I'll have to relearn everything anyway.

 

Thanks for the recommendations, though.

well, C is a tiny language with huge libraries and C++ is a huge language with even bigger libraries

 

not much different except from the object oriented usage of C++ and one other syntax difference

 

in C, structs are called like this

 

#include <stdlib.h>

struct my_struct
{
int an_integer;
float a_decimal;
char a_byte;
};

int main(int argc, char* argv[])
{
/*you must specify that my_struct is a struct*/
struct my_struct mystruct;

return 0;
}

 

in C++

 

#include <cstdlib>

struct my_struct
{
int blah;
float bloh;
char meh;
};

int main(int argc, char** argv)
{
//don't need to specify that my_struct is a struct
my_struct mystruct;

return 0;
}

 

From there on, the syntax is pretty similar.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...