M
marceliogp
I have a file.h that have all my definitions and I need to define a
array to use in my software, but I don´t know how can I do it.
My define´s that cause error:
....
#define ERROR_SAMPLE1 123
#define ERROR_SAMPLE2 124
....
#define FUNCTIONS_EMP { 20, 15, 22, 53, 34)
....
I´d like to use FUNCTIONS_EMP in my software like a ARRAY, sample:
....
Log( ERROR_SAMPLE1 ); ==> same Log( 123 );
....
Log(FUNCTIONS_EMP[1]; ==> same Log( 15 );
....
Thanks for help
===========================================
Protuguês - Brasil
Eu tenho um arquivo file.h que contém todas as minhas definições e
preciso definir um array para usar no meu software, mas não estou
sabendo como fazer isto.
Minha definição que causou erro foi:
....
#define ERROR_SAMPLE1 123
#define ERROR_SAMPLE2 124
....
#define FUNCTIONS_EMP { 20, 15, 22, 53, 34)
....
Eu gostaria de usar FUNCTIONS_EMP no meu software como um ARRAY,
exemplo:
....
Log( ERROR_SAMPLE1 ); ==> same Log( 123 );
....
Log(FUNCTIONS_EMP[1]; ==> same Log( 15 );
....
Obrigado pela ajuda.
array to use in my software, but I don´t know how can I do it.
My define´s that cause error:
....
#define ERROR_SAMPLE1 123
#define ERROR_SAMPLE2 124
....
#define FUNCTIONS_EMP { 20, 15, 22, 53, 34)
....
I´d like to use FUNCTIONS_EMP in my software like a ARRAY, sample:
....
Log( ERROR_SAMPLE1 ); ==> same Log( 123 );
....
Log(FUNCTIONS_EMP[1]; ==> same Log( 15 );
....
Thanks for help
===========================================
Protuguês - Brasil
Eu tenho um arquivo file.h que contém todas as minhas definições e
preciso definir um array para usar no meu software, mas não estou
sabendo como fazer isto.
Minha definição que causou erro foi:
....
#define ERROR_SAMPLE1 123
#define ERROR_SAMPLE2 124
....
#define FUNCTIONS_EMP { 20, 15, 22, 53, 34)
....
Eu gostaria de usar FUNCTIONS_EMP no meu software como um ARRAY,
exemplo:
....
Log( ERROR_SAMPLE1 ); ==> same Log( 123 );
....
Log(FUNCTIONS_EMP[1]; ==> same Log( 15 );
....
Obrigado pela ajuda.