0_0_16930282_31676.cpp: In function 'int main()': 0_0_16930282_31676.cpp:35:31: error: 'i' was not declared in this scope scanf("%lf%lf",&p[i].x,&p[i].y); ^