Thread: C++ Classes...I think
okay looked @ tutorials, few make sense , think it's classes.
want create class (i think) called disposition
essentially, charactername.disposition
can use disposition other characters yet still unique. (i'm messing around rpg text based game if that's help) (planning add graphics later)
appreciated.
not entirely sure you're getting at, sounds want class create characters from, so:
code:// character.h #ifndef character_h #define character_h class character{ public: // constructors , public data , methods go here. <return-type> disposition(<args>); private: // private data , methods go here. }; #endifcode:// character.cpp #include "character.h" <return type> character::disposition(<args>){ // whatever you're trying here. }code://main.cpp #include "character.h" int main(void}{ character charactername; charactername.disposition(<args>); return 0; }
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk C++ Classes...I think
Ubuntu
Comments
Post a Comment