[HELP]how to use the enum in C++ ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]how to use the enum in C++ ? (
/showthread.php?tid=80672)
[HELP]how to use the enum in C++ ? -
mysan - 05.06.2009
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!
Re: [HELP]how to use the enum in C++ ? -
Donny_k - 05.06.2009
Lookup 'structs' on ******, this isn't a c++ forum dude.
Re: [HELP]how to use the enum in C++ ? -
samgreen - 05.06.2009
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
Re: [HELP]how to use the enum in C++ ? -
mysan - 05.06.2009
oh thanks ! im be learn this !
Just i first thought that there is another way
Hmm ... like Boylett using struct in his plugin