ztx4
شنبه 07 فروردین 1389, 18:07 عصر
سلام دوستان
سوالم خیلی فوریه
من دارم یه برنامه به زبان سی می نویسم.سی نه سی پلاس پلاس!!!
این برنامه رو در Visual stdio 2008 نوشتم.
لازم به ذکره که از قسمت properties پروژه کامپایلر رو به TC تغییر دادم.
ضمنا نوع پروژه هم c++ win 32 consol app هستش.
فرمت فایل رو هم از .CPP به .C تغییر داده ام.
اما خطاهای زیر صادر می شود.
اول کد مورد نظر:
#include <stdio.h>
void main(void){
printf("In the nem of god.");
int max;
max=3200;
int k1;
int k2;
int k3;
k1=1;
k2=2;
k3=3;
}
اینم خطاهایی که میده:
Error 1 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 4 c2
Error 2 error C2065: 'max' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 5 c2
Error 3 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 6 c2
Error 4 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 7 c2
Error 5 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 8 c2
Error 6 error C2065: 'k1' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 9 c2
Error 7 error C2065: 'k2' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 10 c2
Error 8 error C2065: 'k3' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 11 c2
لطفا راهنمایی کنید.
سوالم خیلی فوریه
من دارم یه برنامه به زبان سی می نویسم.سی نه سی پلاس پلاس!!!
این برنامه رو در Visual stdio 2008 نوشتم.
لازم به ذکره که از قسمت properties پروژه کامپایلر رو به TC تغییر دادم.
ضمنا نوع پروژه هم c++ win 32 consol app هستش.
فرمت فایل رو هم از .CPP به .C تغییر داده ام.
اما خطاهای زیر صادر می شود.
اول کد مورد نظر:
#include <stdio.h>
void main(void){
printf("In the nem of god.");
int max;
max=3200;
int k1;
int k2;
int k3;
k1=1;
k2=2;
k3=3;
}
اینم خطاهایی که میده:
Error 1 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 4 c2
Error 2 error C2065: 'max' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 5 c2
Error 3 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 6 c2
Error 4 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 7 c2
Error 5 error C2143: syntax error : missing ';' before 'type' c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 8 c2
Error 6 error C2065: 'k1' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 9 c2
Error 7 error C2065: 'k2' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 10 c2
Error 8 error C2065: 'k3' : undeclared identifier c:\documents and settings\ztx4\my documents\visual studio 2008\projects\c2\c2\c2.c 11 c2
لطفا راهنمایی کنید.