SFML community forums
Help => General => Topic started by: Santa-Claus on April 05, 2014, 02:42:13 pm
-
Hello everyone,
So i have a question how would i be able to do something like the following in C++ (using structs or classes) (Code example is visual basic)
Private Type BankRec
Item(1 To MAX_BANK) As PlayerInvRec
End Type
I'm pretty new to C++ and used to use visual basic..... but in visual basic you don't have all the same possibilities and especially not in VB6.0
Kind Regards,
Santa-Claus,
-
I don't know VB, but have a look at "enum". How do you think about a C++ book? ;)
-
And i am actually reading a book atm :p
Just don't find how to do this
I'm actually not looking for enums :(
That's more for item rarity or tile attributes or anything like that.
I think i'm gonna use classes :)
class Inventory {
public:
Inventory();
struct slot
{
int ItemNumber;
int Amount;
};
private:
int Max_Slots;
};
€dit: found it.
King Regards,
Santa-Claus,