Dear All,
What is the wrong with my code...
Code:
#include "stdio.h"
int i=0;
void init()_attribute_((constructor));
void deinit()_attribute_((destructor));
void init()
{
i=10;
printf("init:i=%d", i);
}
void deinit()
{
i=0;
printf("deinit:i=%d\n",i);
return 0;
}
int main()
{
i=i*2;
printf("main i=%d\n", i);
return 0;
}
i am getting two error as follows
\Program Files\Microsoft Visual Studio\MyProjects\eewrew\eewrew.cpp(7) : error C2146: syntax error : missing ';' before identifier '__attribute__'
C:\Program Files\Microsoft Visual Studio\MyProjects\eewrew\eewrew.cpp(7) : fatal error C1004: unexpected end of file found
Thanks for your help