Game Programming




 
game programming
Game Programming :: Programming :: General Programming :: Code Examples :: [C++]Basic class structure - View Topic
Topic Rating: *****
Printable View
Andy
Administrator
*****

Posts: 40
Status: Offline
Gender: Male
Joined:  
pm

Reputation: 0%

[C++]Basic class structure (11th Jan 08 at 1:45am UTC)
Here is a small sample of code to show you how to set up a class using C++, classes are used to make life easy for the programmer as we are working with OOP

so here is the block of code

Code:
 
  1. class className {
  2. public:
  3.  
  4. //attribute of the class
  5. x = 20;
  6.  
  7. //Method of the class
  8. void functionName();
  9.  
  10. };
  11.  
 


so here you have a a very simple class this is the best way to program in C++ as it will make it easy for you but it will take some time getting uste to
 Printable View

All times are GMT+0 :: The current time is 7:54am
Page generated in 0.3451 seconds
Purchase Ad-Free Credits
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums