noob question about sizeof()
#6

Quote:
Originally Posted by dudaefj
Посмотреть сообщение
are you sure?
It's so sad ;(
Yes. For a regular array, the correct way of doing it would be:
pawn Код:
sizeof(array[])
// or
sizeof(array[][])
But since this concerns an enum, I have no idea what size would be returned. I suppose it'd be the largest one. So if you have something like:
pawn Код:
enum myVars {
    string1[64],
    plate[16]
}
There'd be a good chance that it'd return 64, which is not what you want.
Reply


Messages In This Thread
noob question about sizeof() - by dudaefj - 19.09.2014, 16:18
Re: noob question about sizeof() - by Dignity - 19.09.2014, 16:33
Re: noob question about sizeof() - by Vince - 19.09.2014, 16:33
Re: noob question about sizeof() - by Stinged - 19.09.2014, 16:33
Re: noob question about sizeof() - by dudaefj - 19.09.2014, 17:07
Re: noob question about sizeof() - by Vince - 19.09.2014, 17:25

Forum Jump:


Users browsing this thread: 1 Guest(s)