[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/prog/ - Programming

Programming board

Catalog

8chan Bitcoin address: 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C
The next generation of Infinity is here (discussion) (contribute)
A message from @CodeMonkeyZ, 2ch lead developer: "How Hiroyuki Nishimura will sell 4chan data"
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


5325f1 No.1429

What is the best way to learn c++?

274277 No.1430

git gud

61094d No.1440

find someone to learn from who understands the misconceptions that beginners tend to have and who knows how to work around these problems (THIS IS WHAT MAKES A GOOD TEACHER)

if you don't know what to look for when searching for such a person, that means you have about 1 in 30,000 chance of finding a good teacher

or you could try to not be such a faggot and read C++ Primer Plus by Stephen Prata

but mostly try not to be a faggot

249858 No.1480

>>1429

By learning C first. Otherwise you are going to be permanently plagued with awful practises. C++ is a terrible language.

61094d No.1481

>>1480
this person is a fucking retarded piece of shit who does not know what they are talking about in the slightest

there should be a hunt for this person so they can be removed from humanity

249858 No.1483

>>1481

Are you referring to the OP or someone else while talking to me, or talking to everyone else while referring to me?

Anyway, C++ is a terrible language, and easily the absolute worst thing you could possibly start with. It has nothing to do with the difficulty, it's just that it encourages horrendous practices.

61094d No.1484

>>1483
OH MY GOD ITS LIKE THIS GUY IS A VOLCANO ERUPTING MOLTEN BULLSHIT

Maybe instead of regurgitating the words of linus torvalds the greatest faggot of them all you could provide some reason

seriously can we ban this guy from prog

9b39eb No.1485

>>1429
Just about every sort of lesson to it is kind of the same. I.E:

>the basics (operators, if, loops, switch) that almost every programming language has except for syntax differences or some nuances

>writing functions
>structs, union, classes/objects- classes being unique to object oriented programming languages. Plain C will only have structs and unions.
>operator overloading (which some people don't like), which C doesn't have.

And then somewhere in whatever order, C++'s template feature and metaprogramming, memory allocation (pointers, new/delete). If you care enough, inline assembly, though IIRC it's not really recommended to inline (instead have assembly in another file) since it could screw up compiler optimizations.

7b7d89 No.1540

>>1483
>it encourages horrendous practices
such as?

d2f71d No.1545

>>1483
I'm actually agreeing with him. Much of C++'s complexity stems from from his bloated syntax, syntactic sugars and many other features. Its complexity is due to its vast syntax and various facets, not the language itself.
If you were to strip its syntax up to the core, then you'd get quite a simpler language, that is C.

That is to say: it's a terrible language for beginners. One who starts programming has to focus on other major topics rather than delving into syntactical details and performance issues.
C++ does not pose the right perspective toward OO's principles; rather than giving a strong foundation, it requires it in order to be learnt.

61094d No.1553

>>1545
HOLY SINGING/DANCING FUCK you are a complete retard

>it requires it in order to be learnt

Any C code will compile as though it was C++ with no alteration 99% of the time.
You sound like such a faggot it's truly remarkable; yes quite.

you are the just the same fag replying to his own post.
SUICIDE NOW

249858 No.1983

>>1553

>how to tell when someone thinks he knows more than he really does


>Any C code will compile as though it was C++ with no alteration 99% of the time.


Okay. Would you mind explaining how this is relevant now?

f20882 No.1988

>>1429
not to

9f2a71 No.1989

>>1553
anon calm down its all gonna be alright

0fd50b No.1990

>>1429
>What is the best way to learn c++?

1.) Install a compiler
GCC (Every OS I've ever heard of) - de facto compiler for GNU+Linux
Clang (Windows, Mac OS, GNU+Linux, *BSD) - GCC's strongest competitor
MSVC (Windows) - the Official, True And Honest Compiler For Windows


2.) Install a text editor
Hardcore Unix users will tell you to install either vi(m) or emacs, though anything that can produce
plain text (even something as simple as M$ Notepad) will be fine at this stage.

You'll probably want a real text editor later on though; writing anything more than a thousand or so lines "manually" is a great
way to kill your fingers. Good editors, on the other hand, can write a lot of it for you, and syntax highlighting helps when checking
over your code.


3.) Start coding
Of course, you'll definitely want a tutorial as a guide (any of the top ten results on your favourite search engine should do),
but you're never going to learn C++ (or anything, really) unless you experiment with it.

5e7698 No.1994

>>1545
Lol nope. C++ is best for beginners since it encourages you to think about your memory while other with other languages it is all magic. This is what creates bad practice.

C++also teaches you OOP, a paradigm used in many languages.

C++ programmers have little trouble learning new languages, while python babies have a lot of trouble learning lower level languages.

I'm starting to think /tech/ and /g/ hate for C++ is based on their inability to comprehend the language. Similarly their love for C is purely based on elitism.

>hurr hurr c++ syntax is convoluted

No it isn't.
a::b->c.d() tells me tells me more than a.b.c.d()

619059 No.1999

>>1994
>C++ is best for beginners since it encourages you to think about your memory while other with other languages it is all magic
C's memory is magic?

2783f5 No.2003

>>1999
Thanks Sherlock. But C doesn't teach you OOP. I know OOP gets a lot of hate but that's irrelevant since the majority of popular languages use it.

e1ffc2 No.2011

>>2003
Then recommend a language which forces you to use OOP.

9d934d No.2027

>>1429
OP, follow this anon's instructions:
>>1990

You learn by doing OP. If you already know how to program but don't know C++ then I would recommend reading and doing problems from "Accelerated C++" and also "The C Programming Language" by K&R.

If you don't know how to program then I would recommend starting with "C++ Primer" by Lippman and Moo and again "The C Programming Language" by K&R.

Either way, as anon said - you need to be programming to learn. If you want to do anything with GUI's I would recommend using Qt (but do Accelerated C++ first). You'll also probably like the Qt Creator IDE but I would recommend something like emacs for those book problems and avoiding Qt initially (Qt re-implements a lot of the C++ standard library - it would be better to learn the standard library first).

Also learn how to google when you get errors, youtube and stackexchange can be good resources for questions, or ideas for programming challenges for yourself.

These are also useful:
https://www.youtube.com/user/VoidRealms/videos
https://www.hackerrank.com/

9059a4 No.2083

File: 1429166177412.png (36.67 KB, 463x216, 463:216, 1327008336558.png)

What is the best way to go about learning C++? I've been reading books, then trying to go off memory and repeat it. Do the exercises and what not. Also watched a couple youtube videos. I've been pretty successful but its boring the living shit out of me to the point i want to quit. Not because its hard, but because its so boring. Any tips?

e90335 No.2086

i started with easy languages and then moved to some c++ engine which abstracted away all the difficulties and let me write games right away.
then i started slowly getting better.
i already used pointers before learning c++ but if they confuse you just use smart pointers and c++ will feel like c# except without the microsoft faggotry.

Qt (plus Irrlicht engine) is probably what you want, depending on what you like to do exactly.

4f0897 No.2088

>>1990

Can you use MSVS in MSVC's place?

0fd50b No.2090

>>2088
>Can you use MSVS in MSVC's place?
Visual Studio is essentially an operating system a graphical interface for MSVC.
Installing VS will automagically set up MSVC for you.

It's worth noting though that some people will tell you learning a programming language inside an IDE is bad (i.e. you would be learning the IDE, not the language).

f20882 No.2116

>>1994
C++ doesn't even support OOP. If someone tells you it does, never trust anything they say about OOP again. They don't understand it.

23fd59 No.2227

>>1480

No. C is not C++ and vice versa. Stop with that shit already.




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]