C or C++

Should I learn C or C++?

Other urls found in this thread:

cprogramming.com/tutorial/c-vs-c .html
twitter.com/SFWRedditVideos

learn c++ because once you learn it well, c will take literally 20 minutes to learn.

Neither because you can't even tell us what exactly you're trying to achieve

as one clearly originated from the other why not learn both?

no, it will take forever to unlearn C++ to get to C

>Should I learn French or German?
You need to tell us more about your circumstances, senpai

learn C well

then take a look at C++ and realize what a clusterfuck it is. decide to learn the useful features of C++ and ditch the rest.

Shalt thou wist ye olde anglosaxon (C), or should you learn modern English? (C++)

>what is false equivalence

None of those. You know what you should actually learn.

It's a better analogy than French/German analogy.

>should I learn good ol' Queen's English or ebonics

not really because C is superior to C++

this

Depends on what you want to do. If you're learning for shits and giggles then either will do.

Learn C, get good with it, learn some data structures and algorithms (read: implement them yourself), then learn C++, get good, learn the STL and learn it well.

Then when you're done being a little faggot, learn Rust.

Learn Java.
>implying you need anything else, ever
>inb4 mad ctards trying to meme you into their shit designed non-languages

>Java
DESIGNATED
MEMORY
L
E
A
K
S

Learn enough about both to know the difference, and what constructs or syntax is valid C but not valid C++ and vice versa.

90% of this board (and 50% of people in general) don't know.

>UHHHH classes

Learn both, because they are two completely different languages.

C = portable assembly
C++ = modern multi-paradigm programming language that happens to be compatible with C (which is a downside, not a plus)

>that happens to be compatible with C

And which standards are you comparing now?

Sure isn't C++11 and any of the C standards.

...

C++11 is compatible with C. That doesn't mean the other way around is true. It's not a symmetrical relation.

...

>C++11 is compatible with C
Except this is incorrect for every C standard.

You never programmed in your life retard

Learn C++
It is objectively better.

C if you want to do embedded/linux stuff
C++ if you want to do windows shit

C -> C++ -> Then whatever.

kekd

Is there a good book on memory management on c?

What are designated memory dmleaks? :^)

Basically my purpose for learning

Programming for embedded systems sounds pretty cool user
Thanks

If you dont really have much interest in writing gui programs then C is the best.

You really dont need to bother with allocating memory anymore. Most computers now days have 4+ gigs of ram. Malloc is only needed for embeded shit like routers and whatnot.

100% bull. I've been a seasoned c++ programmer for years. It took me around 300 hours to master c. C++ took days (of constant work time) but that was before I was experienced.

how did you master C in 300 hours?

[spoiler]What did you do more precisely? [/spoiler]

not that guy but my suggestion is to read k&r and then read source code of simply programs (reputable ones or even github) and try to volunteer to fix bugs for a few months, or just modify what you have until it works the way you like.

gradually start toying with/writing bigger and bigger packages and collaborating with others or take a more advanced course at a uni if you want a shortcut

yea you need to learn Visual Basic if you want to create a GUI interface, especially if you want to track someones IP

Learn Object Pascal.

Gentoo

C#??

Hindi

>rust
kek. that shit should have died right along with Go

>it took 37 9am-5pm days to learn c
>it took days to learn c++
>somehow this should be interpreted as c being the easy language

It's really going to depend on what you're looking to do.

C: Low level programming. Not thinking about guis, more trying to learn how to program microprocessors and small programs. Think of this as the Computer Engineer route. Also not Object Oriented, but you can almost (if not) make it OO if you know how to write code well.

C++: Thinking more about higher level programming. Think more GUI's, data trees, OO, stuff like that. Think of this as the Computer Science route.

C code can be compiled using the C++ compiler, but not the other way around.

Learning one will make it easy to learn the other...to a point. They both work the same way, but the preferred syntax is different for both. For example, a simple hello world program.

The C version
/*
* Hello World program, hello.c
*/

#include

int main(void)
{
printf("Hello World!\n");
return (0);
}


The C++ version
// Hello World program in C++, hello.cpp

#include
using namespace std; // To make this example easier

int main(void)
{
cout

>implying either rust or go is dead
Rust is being used for Mozilla's ambitious servo project and go is already widespread

this is a false equivalent

this is not


if linux: c++
if windows: c#

What's in C that's not in CPP, honest question.

Sup Forums will recommend C because they don't have jobs and just write tiny useless programs.

C++ is literally C with more shit.

learn != master

I learned C then C++
C++ was rather easy because I already had a solid background with C
On the other hand if you learn C++ first you're effectively learning both languages at once even though you're making things a bit harder.
C is less marketable but it's waay simpler than C++
So basically:
babysteps? C then C++
full clean cock applicator? C++

This guy explains some of the quirks pretty well.
cprogramming.com/tutorial/c-vs-c .html

Going out on a limb for the rest of this here, but I believe I'm correct in what I'm saying.

C can be used to make kernel modules. Linus will NEVER allow C++ to be used in his precious kernel.

C compiles smaller and runs faster, but not always by much. If you are going to program a microprocessor, AVR, STM32, etc, you're much better off going with C of not ASM. C++ adds overhead and in turn that can make your program run/compile incorrectly and make it unable to run on these devices.

Small things like this. That's why I worded it as I did in my previous post. Probably could have been clearer, I apologize.

But caches are still small, and accessing main memory is literally like 100 times slower. If you don't want to manage memory, might as well use Java you fucking Pajeet.

If you want to be viable - both, and a couple more. Meme languages also require you learning names of the latest meme frameworks.

Are you retarded? If you don't allocate, you write on stack, which is 8MB by default, regardless of total system memory.