Hi all,
Could someone tell me what's wrong with this code? I'm using MS Visual C++ IDE and I'm getting a syntax error when compiling this program.
#include<stdio.h>
struct _test
{
int iNum[5];
};
typedef struct _test test;
int main(int argc, char** argv)
{
test newTest;
newTest.iNum = {1,2,3,4,5};
printf("%d\n",newTest.iNum[0]);
printf("%d\n",newTest.iNum[1]);
printf("%d\n",newTest.iNum[2]);
printf("%d\n",newTest.iNum[3]);
printf("%d\n",newTest.iNum[4]);
}