Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1038434 Posts in 41964 Topics- by 33589 Members - Latest Member: MatthewHayden14

September 02, 2014, 10:58:31 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)C-based languages - Where should I start?
Pages: [1] 2 3
Print
Author Topic: C-based languages - Where should I start?  (Read 1585 times)
pxl
Level 0
**


@pixelforge


View Profile Email
« on: February 20, 2013, 11:02:18 AM »

Relatively new to programming, however I want to learn a bit about C-based languages, could anyone tell me where I should start? Panda I just want your opinions on which are relatively easier to get a grasp of for beginners? I hope this question isn't too vague and causes any anger towards me  Giggle
Logged

Evan Balster
Level 10
*****


I live in this head.


View Profile WWW Email
« Reply #1 on: February 20, 2013, 11:18:07 AM »

Start using C++, but learn its programming features one by one.  A lot of people recommend C because it's simpler -- I recommend starting off with C++ but doing mostly C-like things; C++ is essentially C with a lot more features and automation.

Essentially there are a ton of different programming paradigms and features and stuff in the C++ language and it tends to create a lot of confusion because of how many different ways there are to approach any given problem.  So don't worry about virtuals, or templates, or all the other fancy crazy stuff until you've got your head around the super basics:  Pointers, math, basic classes, and maybe a graphics API such as the opensource libraries SDL and SFML.
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
impulse9
Level 5
*****



View Profile WWW
« Reply #2 on: February 20, 2013, 11:31:27 AM »

My suggestion is to start with C because it's a solid foundation for further learning. My personal opinion is that learning C++ is much easier when you are already familiar with C, and the other way around is, well, harder. In C you need to rely on low level constructs and this forces you to learn about computer architecture and operating systems. It's much easier to get carried away in C++ because much of what you're going to use is abstracted away from you, so you don't ever get to the bottom of it, you just see the effects. In C you get to the bottom of things and this will make you understand what is actually going on in the abstractions you use.

Also learning OOP is considerably easier when you are already well-familiar with the procedural realm.

Just my two cents. Good luck on your programming ventures. Smiley
Logged

rivon
Level 10
*****



View Profile
« Reply #3 on: February 20, 2013, 12:46:34 PM »

C++ to C is IMHO easier (I've gone the reverse route). Even easier would be to start with Java or C#, though C++ is better for games.
Logged
HernanZh
Level 2
**


hernizhou@hotmail.com
View Profile WWW Email
« Reply #4 on: February 20, 2013, 02:08:13 PM »

Start with C, then move up to C++. C is a relatively small language.
Logged

@HernanZhSuper Bunny Land!Puyo Puyo VS (beta)

"who doesn't like girls I mean come on" ~rdein 2012
ham and brie
Level 3
***



View Profile Email
« Reply #5 on: February 20, 2013, 03:05:05 PM »

Start with C++, don't get tainted like many programmers doing things in the C way that can be done easier in C++.
Logged
BleakProspects
Level 4
****



View Profile WWW Email
« Reply #6 on: February 20, 2013, 03:14:45 PM »

Start with C++, don't get tainted like many programmers doing things in the C way that can be done easier in C++.

This I can agree with. To be fair, you can become "tainted" either way, but in my opinion it's better to be "tainted" by C++ than by C. Why? Because C is nearly a subset of C++, and if you figure out some crazy way to do something in C, and later have to do it again in C++, you're going to do it the "C way;" while if you learn some crazy way to do it in C++, the odds are that way is just going to be impossible/extremely difficult in C. So you will be forced to learn the "C way" anyway.

Though, it is possible to be tainted by C++ in such a way that you end up writing all your C code with pseudo object-orientation and a proliferation of structs. I just think this is better than writing C-like code in C++ (especially using POSIX stuff instead of STL and other such no-nos).

I also think it's simply not true that C is an "easier" language to learn than C++. In C, you will be very proud of writing an incomprehensible program full of bit twiddling and pointer arithmetic that would have been accomplished in 10 minutes using an STL container and iterators.
Logged

powly
Level 3
***



View Profile WWW
« Reply #7 on: February 20, 2013, 03:20:14 PM »

C++ is a superset of C, making C not nearly, but exactly a subset of C++ Smiley

I'm not going to comment on the language of choice but rather emphasize that persistence is key. Whichever you pick, you really need to write actual working code to learn it properly. The choice (especially when the two are so similar) matters very little compared to this.
Logged
BleakProspects
Level 4
****



View Profile WWW Email
« Reply #8 on: February 20, 2013, 03:27:49 PM »

C++ is a superset of C, making C not nearly, but exactly a subset of C++ Smiley

I couldn't remember whether it was a complete superset, or just "mostly," I guess that was Objective C which is not strictly a superset.
Logged

impulse9
Level 5
*****



View Profile WWW
« Reply #9 on: February 20, 2013, 03:49:14 PM »

C is not a subset of C++, they are different languages.
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #10 on: February 20, 2013, 06:09:21 PM »

C++ is a superset of C, making C not nearly, but exactly a subset of C++ Smiley

I couldn't remember whether it was a complete superset, or just "mostly," I guess that was Objective C which is not strictly a superset.

Objective-C is a superset of C.  C++ is not, nor has it ever been, a superset of C.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
eigenbom
Level 10
*****



View Profile WWW
« Reply #11 on: February 20, 2013, 06:55:33 PM »

Relatively new to programming, however I want to learn a bit about C-based languages, could anyone tell me where I should start? Panda I just want your opinions on which are relatively easier to get a grasp of for beginners? I hope this question isn't too vague and causes any anger towards me  Giggle

Jump straight in. download visual c++ express or xcode, install SFML, and start hacking interactive programs in c++. have fun!
Logged

Xienen
Level 3
***


Greater Good Games


View Profile WWW
« Reply #12 on: February 20, 2013, 09:01:39 PM »

Start with C++, don't get tainted like many programmers doing things in the C way that can be done easier in C++.

This I can agree with. To be fair, you can become "tainted" either way, but in my opinion it's better to be "tainted" by C++ than by C. Why? Because C is nearly a subset of C++, and if you figure out some crazy way to do something in C, and later have to do it again in C++, you're going to do it the "C way;" while if you learn some crazy way to do it in C++, the odds are that way is just going to be impossible/extremely difficult in C. So you will be forced to learn the "C way" anyway.

Though, it is possible to be tainted by C++ in such a way that you end up writing all your C code with pseudo object-orientation and a proliferation of structs. I just think this is better than writing C-like code in C++ (especially using POSIX stuff instead of STL and other such no-nos).

I also think it's simply not true that C is an "easier" language to learn than C++. In C, you will be very proud of writing an incomprehensible program full of bit twiddling and pointer arithmetic that would have been accomplished in 10 minutes using an STL container and iterators.

I would have suggested learning C first until I read this.  Having gone from C++ to C myself, this actually makes a lot of sense to me. As eigenbom (kinda) said, grab a copy of Visual Studio(Windows) or XCode(Mac) and start throwing some stuff together: http://www.cplusplus.com/doc/tutorial/
Logged

Muz
Level 10
*****



View Profile Email
« Reply #13 on: February 20, 2013, 09:07:40 PM »

Try the wibit.net tutorials. It's good enough for learning professional level programming from scratch. Plus they're fun to listen and follow.
http://www.wibit.net/

They recommend C -> C++ -> Objective-C -> Java/C# for a good reason.

You can of course, just go straight to C++ if you like.

I prefer the bottom up approach. It's easier to go top down, but you're less likely to appreciate why some things work that way. It's kinda annoying to 'lose' features like object oriented stuff as you go down. Whereas if you go the other way, it's harder, but more fun as you'll be 'unlocking' new features.

If you're serious about being a programmer, learning low level stuff like C's memory management stuff is important (and a common interview question). If you want quick gratification, do Java/C#.
Logged
xgalaxy
Level 0
***



View Profile
« Reply #14 on: February 21, 2013, 01:17:02 AM »

If you are using MS VS Express, or any VS really, the point is kind of moot anyway, as it doesn't contain a C compiler (at least not one that isn't 30 years out of date and standards compliant).

So you are learning C++ regardless really.

And I know everyone learns differently and all but saying C++ is easier to learn than C is like saying Calculus is easier to learn than Algebra.
Logged
Pages: [1] 2 3
Print
Jump to:  

Theme orange-lt created by panic