Skip to main content

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.

quote posted ravenshade view post
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. };   #endif
code:
// 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

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???