How to explain pointers to a Java/VB programmer

Posted by Skeith on Programmers See other posts from Programmers or by Skeith
Published on 2011-06-27T11:07:24Z Indexed on 2011/06/27 16:32 UTC
Read the original article Hit count: 369

Filed under:
|
|
|

I am writing a game and my friend has offered to help me as it is a RPG and will take a long time to do the "scripting" bit of the game.

The problem is IMO he's not that good a programmer :( (add flame war here). He has only programmed in Java and VB and keeps saying really stupid things to me like "Why don't you drag and drop an onClick event" to design my UI when I'm using DirectX.

I tried explaining pointers to him but his response was, if it's just a variable that holds a memory address, why don't you just use an int?

I create an instance of an attack class and give the creature a pointer to it so if several creatures use the same attack there is only one instance of it. He keeps saying why not put if statements in the creature class for every attack class and set true for the ones that are there.

He has programmed mainly in VB and a little in Java just to learn OOP. How can I explain advanced C++ concepts like pointers and memory management to him? He just doesn't understand there are no super functions like form.show in C++.

© Programmers or respective owner

Related posts about java

Related posts about c++