Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

c++

Name: Anonymous 2012-12-12 6:34

starting to learn programming with C++; this shit is a bitch. i've been wanting to learn, so i can begin to develop a game using the source engine, but damn, any tips?

Name: Anonymous 2012-12-12 6:39

- learn how pointers work
- learn what manual memory management means
- learn how RAII works
- smart pointers are your friend
- STL is your friend
- allocate most shit from stack, not from heap (ie. avoid using new and delete) -> safer code and better performance
- remember: C++ sucks but it still beats C#, Java, Obj-C, C, and such crap languages

Name: Anonymous 2012-12-12 6:46

C++ can become insanely complex, but well, it actually is insanely complex. My advice would probably be to find a free software game written in C++ and take your time to study how that game works. Get yourself a C++ reference manual, I didn't bother trying to study C++ syntax but just reference the manual whenever unfamiliar syntax pops up in the code I was studying.

Name: Anonymous 2012-12-12 8:59

>>2
When you explain a language to a beginner as a jump start, all of the language's failures become immediately obvious.

Name: Anonymous 2012-12-12 9:10

>>2
IHNBT. But also,
C# > Obj-C > Java > C++ > A steaming pile of dog urine in the snow
C is incomparable.

Name: Anonymous 2012-12-12 9:32

>>2
Better than C

muahahahaha

Name: Anonymous 2012-12-12 9:47

>>6
muahahahaha
Back to Reddit News, ``please''.

Name: Anonymous 2012-12-12 10:23

>>7
no!

muahahahahaa

Name: Anonymous 2012-12-12 11:13

>>2
I refuse to be trolled (and I know that you are a troll because your post is so braindamaged that it cannot be written by a honest human).

Name: Anonymous 2012-12-12 11:14

You should stop teaching C++ and start learning some ethics.

Name: Anonymous 2012-12-12 11:48

you'd have better started learning with c

Name: Anonymous 2012-12-12 12:32

>>9
Explain what is braindamaged in >>2

Name: Anonymous 2012-12-12 13:22

>>12
YHBT

Name: Anonymous 2012-12-12 13:24

if you want to become proficient in sepples:
learn c++11 lambdas, auto
learn the type system
learn const
learn pointers and references
learn some design patterns and design techniques
learn what the standard library makes available to you and what things in the standard library you should never use.

ok now you're doing alright. there's more!

understand what the standard guarantees and what it doesn't. if you end up using compiler specific extensions or behavior then make sure you know you're relying on that and it's documented in your code. you should probably also use a static_assert to make the code fail to compile when using a different compiler if you're relying on unique behavior.

learn the rest of the c++11 stuff you didn't figure out like move semantics, rvalue references, constexpr
learn the stl algorithm header
understand templates; how they can be used to do good things and horrible things

and i probably forgot tons of stuff to say because sepples is overfuckingcomplicated and retarded.
the C++ FAQ on parashit ( http://www.parashift.com/c++-faq/ ) is somewhat helpful.

Name: Anonymous 2012-12-12 16:42

>>14
You forgot that C++ is completely fucking useless without Boost, QT, or some other decent library of this sort.  Standard C++ library is mostly a joke, a crippled one even.

Name: Anonymous 2012-12-13 4:35

>>15
C++ without Boost is actually less useful than C for small and mid-sized projects.

Name: Anonymous 2012-12-13 7:13

You don't have to be using Boost. Don't.

Name: Anonymous 2012-12-13 7:46

yain't red da standard

Name: Anonymous 2012-12-13 7:56

>>16
As opposed to C++ with boost which is less useful than C for all sized projects.

Name: Anonymous 2012-12-13 8:36

ITT: retards that don't understand the greatness of SEPPLES

Name: Anonymous 2012-12-13 9:05

>>20
An individual that doesn't understand SEEPLES

Name: Anonymous 2012-12-13 9:29

>>1
I programed many games with C++ on my job.
I'll tell you how to learn it.

1. Read a basic reference for C++.
2. Read samples written in C++/DirectX.
   Direct3D, DirectSound, Direct*** and stuff.
3. Take a cup of coffee.
4. Shutdown your PC, and don't think about programming twice. NEVER!

Name: Anonymous 2012-12-13 14:43

>>19
Yeah, that's why they had incorporated a fucking half of Boost into the new standard almost verbatim.  Not that it means that any of these things is of any use to a mentally sound person.

Anyway if C89 were Perl, C++03 would be PHP4.  And C++11 would be PHP5.

Name: Anonymous 2012-12-13 14:53

don't use sepples. i once red the whole stroustrup book. true story.

Name: Anonymous 2012-12-13 15:46

a shit

Name: Anonymous 2012-12-13 16:22

C++ is crap, but at least it's better than C for when you're forced to use something FAST AND SCALABLE.

Name: Anonymous 2012-12-13 16:34

It's better than C because it has EXCEPTIONS and thousands of other great high-level language features that really fucking belong in the high-level language area while still forcing you to carefully discern . and -> and be very mindful about where it stores your bits and which entity is responsible for their deallocation.  It feels like being a CTO in a large technological company and in addition to your primary tasks like architecture or strategic planning having to micromanage every single employee to stop them from eating glue.

And if you forget to add const or * in one single place in your code g++ will spam you with at least 10kb of indecipherable error messages, and at most, well, I don't know, my personal record is 763 kilobytes of error messages because of a single forgotten token.

Name: Anonymous 2012-12-13 16:52

Name: Anonymous 2012-12-14 10:08

GDB the GNU Debugger B

Don't change these.
Name: Email:
Entire Thread Thread List