[HELP]how to use the enum in C++ ?
#1

Hello peoples !

Im have one question with plugins:

How use the enum function on C++ ?

Example:

Im have playerdata[MAX_PLAYERS][e_num] (im know this in pawn)

and first want write this:

enum e_num
{
x,
y,
z
};



And im want this using like this :

Код:
CommandForPosition(playerdata[i][x],playerdata[i][y],playerdata[i][z]);
but C++ no like this. and im want know how correctly this write on C++
Help please
_________________________________________________
I thanks to all who will try to help me!




Reply
#2

Lookup 'structs' on ******, this isn't a c++ forum dude.
Reply
#3

Unfortunately Pawn does this in a non-standard way. If you are moving to C/C++, the best thing you can do for yourself is to start fresh.

This is a decent tutorial on declaration and usage of structs.

http://www.cprogramming.com/tutorial/lesson7.html
Reply
#4

oh thanks ! im be learn this !

Just i first thought that there is another way

Hmm ... like Boylett using struct in his plugin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)