02-06-2006, 09:51 AM
02-06-2006, 10:04 AM
What do you mean by "version"? Do you mean "what compiler"? C doesn't really have versions...
BTW if you're on Windows, I suggest using MinGW as your compiler and Code::Blocks as your IDE, or VC++ 2005.
And I wouldn't learn C first. Learn C++ first, that way you'll be able to understand OOP better than if you learn C first. Plus, C++ has the Standard Library that will make your life a lot easier when you are learning.
Good luck!
BTW if you're on Windows, I suggest using MinGW as your compiler and Code::Blocks as your IDE, or VC++ 2005.
And I wouldn't learn C first. Learn C++ first, that way you'll be able to understand OOP better than if you learn C first. Plus, C++ has the Standard Library that will make your life a lot easier when you are learning.
Good luck!
02-06-2006, 10:44 AM
ok thats what i realy ment!
weither i should use C,C++ or Visual C,ect.
thanks
weither i should use C,C++ or Visual C,ect.
thanks
02-06-2006, 03:39 PM
C++ doesn't teach good OOP, mainy 'cause its implementation of OOP is dirty, bloated and ugly. I'd rather learn OOP with a proper (pure) OOP language such as Java. Then, when concepts are clear, I'd go to C++.
02-06-2006, 04:46 PM
Quote:dirty, bloated and ugly
The smallest c++ program i seem to be able to compile with gcc is 260Kb. god knows how bloated a real program will be. That's really put me off c++
02-06-2006, 05:36 PM
stripping symbols from your executable, use vc etc. etc. depending on what you use ( std::cin, std::cout etc. ) you'll get a lot of uneccessary stuff linked in if you don't care for stripping stuff. but of course deciding against a language due to it's exe size is of course more reasonable then deciding against it due to features and mechansims...
02-06-2006, 05:59 PM
test.cpp:
[syntax="C"]
#include <cstdio>
int main(int argc, char** argv)
{
printf("Hello, world.\n");
return 0;
}
[/syntax]
test2.cpp:
[syntax="C"]
#include <iostream>
int main(int argc, char** argv)
{
std::cout << "Hello, world." << std::endl;
return 0;
}
[/syntax]
So basically, just because your C++ compiler sucks (okay, MinGW/g++ is nice, but... for some reason, the output is huge with iostreams), doesn't mean you should hate C++. It's a wonderful language (just not as beautiful as Java).
[syntax="C"]
#include <cstdio>
int main(int argc, char** argv)
{
printf("Hello, world.\n");
return 0;
}
[/syntax]
Code:
chris@apex:~/Sandbox> g++ test.cpp -o test
chris@apex:~/Sandbox> ls -hal test
-rwxr-xr-x 1 chris users 7.0K 2006-02-06 12:54 test
chris@apex:~/Sandbox> strip test
chris@apex:~/Sandbox> ls -hal test
-rwxr-xr-x 1 chris users 3.3K 2006-02-06 12:54 test
chris@apex:~/Sandbox>
test2.cpp:
[syntax="C"]
#include <iostream>
int main(int argc, char** argv)
{
std::cout << "Hello, world." << std::endl;
return 0;
}
[/syntax]
Code:
chris@apex:~/Sandbox> g++ test2.cpp -o test2
chris@apex:~/Sandbox> ls -hal test2
-rwxr-xr-x 1 chris users 8.6K 2006-02-06 12:56 test2
chris@apex:~/Sandbox> strip test2
chris@apex:~/Sandbox> ls -hal test2
-rwxr-xr-x 1 chris users 4.3K 2006-02-06 12:56 test2
chris@apex:~/Sandbox>
So basically, just because your C++ compiler sucks (okay, MinGW/g++ is nice, but... for some reason, the output is huge with iostreams), doesn't mean you should hate C++. It's a wonderful language (just not as beautiful as Java).
02-06-2006, 07:19 PM
Learn C before you learn C++. C++ has a wicked learning curve, C is much more relaxed and far better if you come from a BASIC background since both are procedural and you don't have to get your hands dirty with OOP when you code C. C also tends to be way more portable than C++, so the code you write in C is generally reusable without changes across many compilers and platforms. That way, you can try out several compilers and find the one thats best suited for you, then move on to C++ with it when you're ready for the challenge. Also, don't let people fool you...C++ isn't nearly as portable as people like to hype it up to be.
02-06-2006, 07:52 PM
Quote: ... (just not as beautiful as Java).
you filthy filthy java whore! may i make you remember 1.4 with no generics?
02-06-2006, 07:53 PM
I never wanted to say that C++ is a bad language (although I don't like it at all), just that it is not very didactic. To learn OOP, it's better to have a pure OO language such as Java. C++ allows a lot of non-OO dirty stuff which should be avoided when learning. Then, there comes the hacks.
It's like GOTO in BASIC
It's like GOTO in BASIC