int main()
{
void runStandardIMNEWintro();
}
Ahem...
I've punched through "Beginning C++ Through Game Programming (4th ed)" and also reviewed numerous blog posts and forum threads about pointers. Alas, I still struggle.
Can someone (as best you can) attempt to draw out a real-world example of how Pointers are useful?
I understand that they link to the information at the "address" of a variable, I just don't understand the... Point?
If possible, review the Class below and provide an example of why a Pointer would be used and why it is useful:
class Goblin
{
public:
int gobHP;
void gobSpell();
private:
m_Name;
}
If the above seems too bizarre (Or I'm just bad at giving an example of something to use...) feel free to lay it out differently. I'm in the process of coding a text-based game as my first foray into true C++ coding and want to make sure that I am implementing the cleanest and most effective code that is (reasonably) possible.
Thanks in advance!