My console app. works with the code below why does my Win32 app choke up on these errors?
Code:
// test struct program console app.
#include <stdio.h>
struct test
{
int x;
int y;
} *pPoint, *pp, Point[4] ={
5,6,
7,8,
9,10,
11,12,};
int main()
{
for(int count = 0; count<4; count++)
{
pp = &Point[count];
printf("Point[%d].x = %d\t Point[%d].y = %d\n", count, Point[count].x, count, Point[count].y);
}
puts("");
return 0;
}
// My windows program...contains this as a global structure.
Code:
struct test
{
int x;
int y;
}Point[4], *pp;
pp = &Point[0];
and give me these errors:
error C2501: 'pp' : missing storage-class or type specifiers
error C2040: 'pp' : 'int' differs in levels of indirection from 'struct test *'
error C2440: 'initializing' : cannot convert from 'struct test *' to 'int'