C and C++ at the same time?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
MisterReplicant
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 18
Joined: Sat Oct 09, 2010 10:06 am
Contact:

C and C++ at the same time?

Post by MisterReplicant »

I've learned different languages at the same time (HTML and Javascript) and done fine. But, I heard that you SHOULD learn C++ first, because if you learn C THEN C++ you must un-learn bad habits.

I am learning C++ on my Mac on XCode and I am going to be getting an Arduino soon, I program that in C. Is it possible to learn C++ and C at the same time? (well, of course it is POSSIBLE, but SHOULD I do it??)

Thanks.
~MR
http://www.youtube.com/MisterReplicant
Needs more subscribers B)

XD
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: C and C++ at the same time?

Post by davidthefat »

MisterReplicant wrote:I've learned different languages at the same time (HTML and Javascript) and done fine. But, I heard that you SHOULD learn C++ first, because if you learn C THEN C++ you must un-learn bad habits.

I am learning C++ on my Mac on XCode and I am going to be getting an Arduino soon, I program that in C. Is it possible to learn C++ and C at the same time? (well, of course it is POSSIBLE, but SHOULD I do it??)

Thanks.
~MR
Well I can hardly say Arduino is programmed in C, it has a very C like syntax, but it is not C
MisterReplicant
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 18
Joined: Sat Oct 09, 2010 10:06 am
Contact:

Re: C and C++ at the same time?

Post by MisterReplicant »

davidthefat wrote:
MisterReplicant wrote:I've learned different languages at the same time (HTML and Javascript) and done fine. But, I heard that you SHOULD learn C++ first, because if you learn C THEN C++ you must un-learn bad habits.

I am learning C++ on my Mac on XCode and I am going to be getting an Arduino soon, I program that in C. Is it possible to learn C++ and C at the same time? (well, of course it is POSSIBLE, but SHOULD I do it??)

Thanks.
~MR
Well I can hardly say Arduino is programmed in C, it has a very C like syntax, but it is not C
Really?? I thought I saw somewhere it was C... So what language would it be considered? (Low-level, right?)
http://www.youtube.com/MisterReplicant
Needs more subscribers B)

XD
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: C and C++ at the same time?

Post by dandymcgee »

Well the beginnings of C++ are much like C anyways, I've never gone looking explicitly for C tutorials, but I feel like I have a good understanding of it just from using C++ for so long and catching other people's old C habits in their C++ code. Once you get passed the basics in C++ and start heading toward OO concepts you're going in the complete opposite direction of C, that's when you'd have to realize and understand the differences.

Stream vs. printf
String vs. char*
Class vs. struct

If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: C and C++ at the same time?

Post by Ginto8 »

dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: C and C++ at the same time?

Post by dandymcgee »

Ginto8 wrote:
dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
MisterReplicant
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 18
Joined: Sat Oct 09, 2010 10:06 am
Contact:

Re: C and C++ at the same time?

Post by MisterReplicant »

dandymcgee wrote:
Ginto8 wrote:
dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?

So you are saying have a solid understanding of C before C++?
http://www.youtube.com/MisterReplicant
Needs more subscribers B)

XD
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: C and C++ at the same time?

Post by Ginto8 »

MisterReplicant wrote:
dandymcgee wrote:
Ginto8 wrote:
dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?

So you are saying have a solid understanding of C before C++?
I recommend learning both. However, the one you are probably going to actually need more is C++, so that's the priority.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: C and C++ at the same time?

Post by dandymcgee »

MisterReplicant wrote:
dandymcgee wrote:
Ginto8 wrote:
dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?

So you are saying have a solid understanding of C before C++?
No, I'm saying the two languages are close enough that no matter which you choose it will ease the learning of the other later on.
Ginto8 wrote:I recommend learning both. However, the one you are probably going to actually need more is C++, so that's the priority.
That's solely your opinion, and I agree with it. Go with C++ then go back and look at something written in straight C later on.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
MisterReplicant
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 18
Joined: Sat Oct 09, 2010 10:06 am
Contact:

Re: C and C++ at the same time?

Post by MisterReplicant »

Will do! Thank you everybody!
http://www.youtube.com/MisterReplicant
Needs more subscribers B)

XD
Post Reply