enum question
#1

do you include ";" after the enum or not?
eg:
PHP код:
enum E_PINFO
{
    
Pass,
    
tokens
}; 
OR

PHP код:
enum E_PINFO
{
    
Pass,
    
tokens

^^ without the ";"

It compiles both ways

which way it correct?
Reply
#2

Of course

PHP код:
enum E_PINFO 

    
Pass
    
tokens 

Reply
#3

I guess it depends?
I don't usually include the ;
Reply
#4

Quote:
Originally Posted by itsCody
Посмотреть сообщение
I guess it depends?
I don't usually include the ;
I only include the ; like this

PHP код:
enum
{
    
DIALOG_LOGIN,
    
DIALOG_REGISTER
}; 
But when it comes to user data , vehicle data or more, I dOn't include the ;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)