[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Should I learn C or C++ first? I know they are basically different

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 32
Thread images: 4

File: maxresdefault.jpg (19KB, 1024x768px) Image search: [Google]
maxresdefault.jpg
19KB, 1024x768px
Should I learn C or C++ first? I know they are basically different but share similarities.
>>
C# if you have a real work
>>
>>60124559
> I know they are basically different but share similarities

Learn Lua or Python.
>>
>>60124559
Java
>>
>>60124559
1.Assembly
2.C
3.C++
4.C#
>>
>>60124559
It doesn't matter what you learn first. The concepts you acquire translate into every single language there is.

Just fucking pick ANY of them and go. No, don't fucking give me any of your shit backtalk just do what I fucking told you to do you little shit.
>>
C, C++ and C# are literally the same language (and an obsolete one, that is!)
You should learn Python or Golang instead.
>>
>>60124559
D or C
>>
>>60124559
c++17
>>
File: 1493152254968.jpg (48KB, 656x360px) Image search: [Google]
1493152254968.jpg
48KB, 656x360px
>>60124656
>C, C++ and C# are literally the same language (and an obsolete one, that is!)
You have no fucking idea what you're talking about, do you?
>>
Learn Rust, OP
>>
>>60124559
Learn C and jump straight to Rust.
>>
>>60124559
The languages are very different and have different applications.

C is simpler which means it have been working for a lot longer than C++ and is very good as a system language as it has been translated into every architecture.
It is basically a high level language for assembler, but compared to other languages, it is much closer to the hardware.
You want to use it when you need to describe how a computer should do a task.

C++ uses the same syntax and basic structure as C.
There is a ton of stuff added onto it which makes it convenient for most programmers.
Those additions have been unreliable and not worth using until ~ 2012-2013 when the 2011 changes where fully implemented everywhere.
It is better for desktop applications where you need to describe how the application should function rather than how the computer should do it.

Picking a "first" language is mostly irrelevant.
Pick the one that you think is most relevant at the moment and stick with that for now.
Learning the other is not very hard once you have learned the first.

If you are not being taught a specific language, you can basically just flip a coin and start to do the exercises.

Do the different sorting algorithms,
Create the basic data structures, fifo, AVL, graphs and hash tables.
implement the basic algorithms: A*, iterative depth first search, ransac, hough and kalman.
Then implement the basic numerical mathematic equations so you can solve linear equations, differential equations and second order differential equations.

Along the way you can learn the different documentation and design techniques.
That stuff is important and if you want to work with other people, you need to learn this too.

Once you have done this, using this in any language is trivial.
>>
>>60124559

Start with with c++. Let the compiler help you. C++ is very complex so as you learn the language you are going to start out with very 'c' ish code.

Later you will understand how very differently 'c' and c++ code is structured. You will learn about structures and pointers as you go through c++, so at some point you are going to absorb most of the 'c' syntax.

At that point, writing one or two 'c' programs by limiting your syntax will solidify the difference between the two languages in your mind. In 'c' you lean on the pre-processor a lot more and that will be the last little bit to pick up.
>>
>>60124559

>I know they are basically different but share similarities
C++ started as an extension of C - but modern, idiomatic C++ stays away from its C heritage as much as it can.

You shouldn't really think of them as the same way. It's better to view C++ as a language with inline support for C, same way that C has inline support for assembly.
>>
File: 1489301212655.jpg (118KB, 960x947px) Image search: [Google]
1489301212655.jpg
118KB, 960x947px
Real patriots code in C!
>>
>>60124559
Depends on what you want to do.

if your goal is to make applications, you will want C++, so that's what you should start with.

Don't listen to the "hurr learn C first if you want to learn C++" retards, they have no idea what they're talking about.
>>
File: 1462457347311.jpg (39KB, 709x765px) Image search: [Google]
1462457347311.jpg
39KB, 709x765px
>tfw was learning C fine by myself until I got into the malloc/calloc part
>>
>>60126201

what's wrong with malloc?

It's literally just a "give me this many bytes" functin
>>
>>60126207
there's nothing wrong with it I'm just stupid
>>
>>60124623
>this
>>
>>60124622
>>Java
Fuck Java, C# is much more intuitive than Java
>>
>>60124623
this
>>
>>60125666
quality comment anon
>>
>>60127046

Java is more intuitive than C#, just because it's simpler.

But C# has way more niceties.
>>
>>60124559
Let me tell you that this c family of language is really really hard specially c#
>>
c. go. js. then maybe whatever you'd need
>>
If you want a job in tech one day learn python and do hackerrank, codeforces, topcoder, codechef and google code jam problems. That's all they ask for on whiteboard interviews and will get you into fb, google, msft making 100k+.
>>
>>60124559
C++ because there's no ++ in C
>>
>>60127562
>there is no increment operator in C

the fuck? what do you think C++ means? It means it's the next increment of the C language. That was the goal of naming it like that
>>
>>60125917
Don't listen to this anon, OP. Start with C, get a good grasp on how to handle memory without leaks, manage C-style strings, and get acquainted with the low levels of the language. Then when you're comfortable with all that, never use C again. C++ is the only language you need to write in, barring some extreme time-sensitive embedded system. Using C when C++ would just as easily suffice is how you earn autism points.
>>
>>60124623
i am
Thread posts: 32
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.