I learnt C without realising it....how the?

Started by
24 comments, last by Will F 18 years, 8 months ago
I'm going through my c++ beginner's tutorial and I get kinda confused....because I'm really bored I go on a C beginner's tutorial and zip through and realise I accidentally learnt C.... what's the difference? printf() and cout<<, same thing really...I don't believe it! Now that I learnt the basics of C, maybe I should extend my knowledge (which came from nowhere) and go for more advanced things.... And I need you guys to tell me how I can extend my basic knowledge to smething more advanced....maybe game development (OpenGL or DirectX)!? Or should I simply continue learning c++ because I'll get a better result in the end.... RECENTLY EDITED: Obviously, these are only the basics so I need to stay on the lines...I'm not some big professional C programmer...I don't think too big of myslef....
Advertisement
Learn C++.
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Well.....there is something called a GOTO command and there are such things called memory pointers which allow me to access blocks of memory and even change them...I don't necessarily have to learn OOP to be able to re-use and change blocks of data.
what header files do you use.
Quote:Original post by theadamSGT
what header files do you use.


I don't understand what a header file is (I'm gonna get flamed for this).
There are many things that C and C++ can both do, so from that respect there isn't a lot of difference.

However, whilst some things are easier and you'll find yourself using some C functions in your C++ programs (sprintf() being one I use), I personally find C cumbersome, clumsy and confusing when compared to the new streamlined way of doing things as introduced by C++.

C++ also offers more advanced features such as classes and templates, OO concepts which C doesn't really know. C does run faster than C++ due to it being at a slightly lower level, but this probably won't concern a beginner much.

C is easier imho, but C++ will probably prove to be more useful. I use C samples to get the basic logic nailed down (like sorting algorithms), and then migrate the code to C++.

I hope this has helped, just go with what you feel is best, and good luck!

ukdeveloper.
whats the first line you use in your programs
It has helped, UKdeveloper!

I will continue with both C and C++...I hope you guys will still reply to my c++ help topic...I personally think that c++ is very complicated so I'll use C mainly until I truelly finish learning c++!
Quote:Original post by theadamSGT
whats the first line you use in your programs


In C?

#INCLUDE <STDIO.H>

In c++:

#include <iostream>
okay.

This topic is closed to new replies.

Advertisement