Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
quick question 4 C programmers
#1
what is the best version of C to start learning?
i would like to branch out past QB
t is better to error on the side of caution
than the side of haste!!!
[Image: title3.jpg]
Reply
#2
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!
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#3
ok thats what i realy ment!
weither i should use C,C++ or Visual C,ect.
thanks
t is better to error on the side of caution
than the side of haste!!!
[Image: title3.jpg]
Reply
#4
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++.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
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++
EVEN MEN OF STEEL RUST.
[Image: chav.gif]
Reply
#6
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...
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#7
test.cpp:
[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).
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#8
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.
\__/)
(='.'=) Copy bunny into your signature to
(")_(") help him gain world domination.
Reply
#9
Quote: ... (just not as beautiful as Java).

you filthy filthy java whore! may i make you remember 1.4 with no generics?
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#10
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 Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)