#include <stdio.h>
typedef struct point{
int x;
int y;
};
void main (void){
struct point pt;
pt.x = 20;
pt.y = 333;
struct point pt2;
pt2.y = 55;
printf("asd");
return;
}
VS 2008
c:\documents and settings\lyd\mis documentos\ejercicio1.c\ejercicio1.c\ejercicio1.c(14) : error C2143: syntax error : missing ';' before 'type'
c:\documents and settings\lyd\mis documentos\ejercicio1.c\ejercicio1.c\ejercicio1.c(15) : error C2065: 'pt2' : undeclared identifier
c:\documents and settings\lyd\mis documentos\ejercicio1.c\ejercicio1.c\ejercicio1.c(15) : error C2224: left of '.y' must have struct/union type
Build log was saved at "file://c:\Documents and Settings\LYD\Mis documentos\ejercicio1.c\ejercicio1.c\Debug\BuildLog.htm"
ejercicio1.c - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========