Just a general question, should C be learned before C++?
Thanks
Printable View
Just a general question, should C be learned before C++?
Thanks
Thats what I did but Im regretting that decision more and more each day as each thing would be alot easier with OPP. Also alot of my friends only do C++ not C so its hard for them to help me troubleshoot. So I would say C is easier in the short run but if your in for the long hual go for C++.
I don't know about C++, all I know is that in my career when you choose programming it's C
If you do not know C is a perfect subconjunct of C++, the switch beween C and C++ is not soooo hard, there are plenty of books that helps you in the transition, but I cannot mention them, because my books are in spanish.
Camilo
regreting all my life
I relize that but IM studying Win32 API right now not including working and homework :-(
C is definitely the way to go. API is all C. You can use MFC which is classes (C++) wrapped around the API.
There is a reason why C has been around so long (and it is still the prime language for serious developers -- besides ASM).
--Garfield
>>C is definitely the way to go. API is all C.
WinAPI can be used with c++ and loads of other languages as well (VB, Delphi)...you dont need just C for that. In fact if you want to go into MFC then you will need c++....
>>and it is still the prime language for serious developers
Well thats a bit of a debate right there
>>-- besides ASM
Oh yeah?.....:p
Personally I went into C first off....... I then went into Java to ween me of the idea that all coding should be procedural..... I'm now ploughing into C++ as much as I can....
>> >>-- besides ASM
Oh yeah?..... <<
Yeah!
>> WinAPI can be used with c++ and loads of other languages as well <<
Yes, but the API (not any libraries (MFC, OWL), just the core API) is C. Only C. Consisting of pure C. C and only C!
--Garfield
>>Yes, but the API (not any libraries (MFC, OWL), just the core API) is C. Only C. Consisting of pure C. C and only C!
No..they are API functions that can be accessed with other languages as long as they are up to it (Dephi 2 introduced a null ended string to be able to use the WinAPI), and as long as they have the right libraries......
Hell, Mr ASM Man.... go see this. This man does WinAPI stuff in ASM.........
>> accessed with other languages <<
Yes! They can be accessed with other languages. But, the API is written in C. Not VB, Delphi, C++, etc. The API is written in C.
--Garfield
:)
so going back to your original point.....there is no direct benefit in only using C for WinAPI??
Anyway...what makes you sure that the API was written in C?
There must have been loads of coders working for ages on the libraries, the intergration and planning etc..........They all used (to quote) "C. Consisting of pure C. C and only C!" ?????????
What do you mean??? The API is just the one library written in C. Why, what language do you think it is written in?
--Garfield
Thanks for all the excellent answers. I will learn C and java at the same time.
THanks
BB
Java??? Ewww! Don't ever...ever...say that form of coffee bean in my presence again. Never!
--Garfield
Well, my only languages are Java, C, and x86 assembly...
Now my thoughts on not learning C so you can learn OOP....
OOP can be done in C. In fact, it's something of an inevitability when trying to write a program that's both large and understandable. Furthermore, OOP in C is not difficult once you get the idea of it. The difference between OOP in C and C++ is that it's more automated in the latter (and C++ has operator overloading, which I take it helps out on typing an awful lot).
I say that C is an exellent language in which to learn programming because it hides very little from you. You allocate the memory, you specify the variables' scopes, you handle how they are passed. Programming means more than being able to produce an application to perform activity X. You also need to understand how you are doing what you are doing.