I would like to thank everyone for helping me understand
scopes of classes, pointers and dynamic objects. I am
actually using pointers now in my code and
this:
Example: Character * ptrChar = new Character(); //parameters if I need them
Really comes in handy and also "this pointer" to .
zodiac976 wrote:I would like to thank everyone for helping me understand
scopes of classes, pointers and dynamic objects. I am
actually using pointers now in my code and
this:
Example: Character * ptrChar = new Character(); //parameters if I need them
Really comes in handy and also "this pointer" to .
I really need to get onto pointers, I kinda get it but not really... Its like you did Algebra, now go onto Algebra 2
I got a little worried about not using pointers in my new project
but I went back today and plugged in pointers where they are
needed and not only does the program run good it looks great
and is more toward OOP .
I could go on with a huge list of what I learned so far but I can
say I learned a lot more here than I did in college classes.
I can't wait to finish my text-based RPG and show it off .
Character*? I'm hoping you don't mean a substitution for char, because dynamic arrays of chars are about the most useful things in C++. example of a possible use for them (a static array would probably be more appropriate for certain parts):
so char arrays (especially dynamic) are extremely useful, and I'm hoping you didn't make a class to substitute them, because that's just clunky and wasteful .
</rant>
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Ginto8 wrote:Character*? I'm hoping you don't mean a substitution for char, because dynamic arrays of chars are about the most useful things in C++. example of a possible use for them (a static array would probably be more appropriate for certain parts):
so char arrays (especially dynamic) are extremely useful, and I'm hoping you didn't make a class to substitute them, because that's just clunky and wasteful .
</rant>
no Character is an object of a class not the data type char.
I hardly use c-strings as I always fall back on the string
object.