123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|278|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> C++ Pointer Loving

Wed, 20 Jul 2011, 15:30
steve_ancell
Been learning C++ for about a week now. Pointers and references are f***ing awesome!.
Wed, 20 Jul 2011, 15:30
jedimastersterli
First guy I've heard ever like them. most people think them damned confusing
Wed, 20 Jul 2011, 16:09
Hotshot
C++ can be daunting if person doesnt know C++ very well and yes...Pointer can be confusing sometime!
Wed, 20 Jul 2011, 16:10
shroom_monk
First guy I've heard ever like them. most people think them damned confusing


Nah, pointers and such like are incredibly useful, and to make full use of C++ you need to understand them. As Hotshot says, they can be difficult to understand at first, but once you understand the other parts of C++, they aren't so tough to pick up. And once you do, a powerful new part of the language will become accessible to you.

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Wed, 20 Jul 2011, 17:55
steve_ancell
Pointers and references have a very useful role of being able to pass a "local" variable to a function, not just a copy of the variable. That's a feature that I would have liked to be included in Blitz3D, although you can do that with user-Type-variables.

I reckon that I could could start looking into using media libraries pretty damn soon, I will probably start with the one that shroom suggested (SFML).
Wed, 20 Jul 2011, 18:14
steve_ancell
I've been having a little play around with references, using Visual C++



Fri, 22 Jul 2011, 17:26
Hotshot
what is your goal in C++?
Fri, 22 Jul 2011, 20:07
steve_ancell
A plan on using it with the App Game Kit library.
Sat, 23 Jul 2011, 05:22
Hotshot
App Game Kit library?

You mean going make own framework?
Sat, 23 Jul 2011, 06:06
Retro
If you're seeking to illustrate the use of references, it's a bad example.

Not wanting to appear too critical... but the return statement in your increment() function is completely redundant.

Actually, the function itself is inefficient and would probably be better implemented as a macro - that's assuming you really need to rename that particular operation in the first place, which I would also question.
Sat, 23 Jul 2011, 10:06
steve_ancell
@Hotshot: Here's a link to AGK www.thegamecreators.com/?m=view_product&id=2295. Also have a look in the forums: forum.thegamecreators.com/?m=forum_read&i=41



@Retro: That return statement is just a force of habbit, I know it's redundant, but also completely harmless. As for the function being inefficient, I'm only a beginner with C++. Got any examples as to how you would pass a variable to a C++ function?, c'mon then, spill the beanz.
Sat, 23 Jul 2011, 10:33
steve_ancell
@Hotshot: App Game Kit does the same sort of thing as Blitz Reasearch's monkey.