|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
umm, how do you call a class that you have made if it is nested in another one? would it be
Code:
weapon.longsword Code:
class weapon
{
class longsword
{
public:
int cost,range;
string dmg, dmgtype, size;
cost = 20;
dmg = (rand()%7) +1;
range = 5;
dmgtype = "slashing";
size = "one handed";
};
};
|
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP 5 and OOP | Jordan | PHP Tutorials | 11 | 09-22-2008 02:58 AM |
| Tutorial: Starting C# with C# 2008 Express Edition | Jordan | CSharp Tutorials | 19 | 08-08-2008 01:48 PM |
| Understanding the differences between a class and struct in C# : | Jordan | CSharp Tutorials | 4 | 04-20-2008 10:32 AM |
| Issue writing to file: pointer to a class which contains pointers to other classes | Sheemer | C and C++ | 0 | 08-21-2007 02:17 AM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |