-
arrays
ok in the tutorial im reading it only shows uses for arrays using strings
http://www.zeuscmd.com/tutorials/cpl.../07-Arrays.php
so how could i use arrays for things like invenotorys and stuff?
just a simple code is all i ask even if only 1 or 2 lines
-
Here is a simple example using enums.
Code:
const int MAX_INV = 5;
//An enum for the different types
//of objects we will have
enum eInvObject{
eInvObjectSword,
eInvObjectArmor,
eInvObjectHotChick,
eInvObjectAbsoutlyNoChicks,
eInvObjectNone
};
int main()
{
//Set up the arrays
eInvObject eInventoryBmans[MAX_INV];
eInvObject eInventoryMajorSmalls[MAX_INV];
for(int i = 0; i < MAX_INV; i++){
//You know it!
eInventoryBmans[i] = eInvObjectHotChick;
eInventoryMajorSmalls[i] = eInvObjectAbsoutlyNoChicks;
}
return 0;
}
-
thanks that makes it somewhat clearer
-
Heh, way to refer to women as objects, prog. ;)
-
hey hey he said hot chicks dont forget that
-