راهنمایی در مورد برنامه visual C++و نوشتن برنامه
سلام
آقایون من سی میخونم تاحالا هم با توربو کار میکردم به گفته دوستان دارم میرم سراغ ویژال حالا یکسری مشکلاتی بوجود اومده برام از جمله
وقتی برنامه رو اجرا میکنم کار نمی کنه یعنی توش کد مینویسم و همش ارور می ده
در این مورد توضیح بدین ایا کار خوبی میکنم تو این محیط کار میکنم یا نه
این کدها رو در برنامه ویژوال سی ران کردم و ارور داد
این برنامه تقویم فارسی هست
نمونه کد
کد:
#include<conio.h>
#include<dos.h>
main(){
int n,year,month,count_day,x,y3=1,y=1,y1=0,y2=4,day,k_year;
char *dd[7]={"ù“÷‹‹‹‹ª","ù“÷‹‹ªîþ","ù“÷‹‹ªø¢","ù“÷‹‹ªù¨",
"ù“÷ª¤‘ú","ù“÷ªš÷• ","ùãõ‹‹‹‹›"} ;
char *mm[12]={"FAR","ORD","KHO","TIR","MOR","SHA",
"MEH","ABA","AZA","DAI","BAH","ASF"};
clrscr();textcolor(15); gotoxy(30,12);cprintf("ENTER YEAR ");
cscanf("%d",&year);
clrscr();
gotoxy(75,1);cprintf("%d",year);
for(int block=1;block<=3;block++)
{
y3++;
x=59;
for(int week_day=0;week_day<7;week_day++)
{ if(week_day==6)textcolor(4); else textcolor(1);
gotoxy(70,y3); cprintf("%s",dd[week_day]); y3++; }
for(month=y1;month<y2;month++)
{ textcolor(3);gotoxy(x,y);cprintf("%s",mm[month]);x-=18;}
y+=8; y1+=4; y2+=4;
}
y=year-1303;
if((y+1)%4) k_year=1;else k_year=0;
y=(y+(y/4))%7;
if(!y) y=7;
y++;
if(year==1379) y--;
if(year==1378) k_year=1;
x=65;
for(month=1;month<=12;month++){
if(month==5||month==9) { x=65; y+=8;}
if(month<=4){y1=2;y2=8;}
else if(month>=5 && month<=8){ y1=10;y2=16; }
else {y1=18; y2=24;}
if( month<=6) day=31;
else if(month>=7&&month<=11) day=30;
else if(month==12&&k_year) day=29;
else if(month==12&&!k_year) day=30;
count_day=1;
//textcolor(2);
while(day>=count_day){
while(y<=y2){
delay(20);
if(y==8||y==16||y==24)textcolor(4);
else textcolor(2);
gotoxy(x,y);cprintf("%d",count_day);
y++; count_day++;
if(count_day>day)break;
}
x-=3;
if(count_day>29) y3=y;
y=y1;
}
y=y3;
}
getch(); getch();
textcolor(15);gotoxy(25,12);cprintf("WRITEN BY:: JALIL MOHAMMADI");
}
اینم قسمت دیباگ
کد:
'tagh.cpp.exe': Loaded 'C:\Documents and Settings\admin\My Documents\Visual Studio 2008\Projects\tagh.cpp\Debug\tagh.cpp.exe', Symbols loaded.
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcm90d.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\msvcr80.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll'
'tagh.cpp.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\9adb89fa22fd5b4ce433b5aca7fb1b07\mscorlib.ni.dll'
'tagh.cpp.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
'tagh.cpp.exe' (Managed): Loaded 'c:\Documents and Settings\admin\My Documents\Visual Studio 2008\Projects\tagh.cpp\Debug\tagh.cpp.exe', Symbols loaded.
'tagh.cpp.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\system32\rsaenh.dll'
'tagh.cpp.exe' (Managed): Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcm90d.dll'
'tagh.cpp.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\aa7926460a336408c8041330ad90929d\System.ni.dll'
'tagh.cpp.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
The thread 'Win32 Thread' (0xa40) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf80) has exited with code 0 (0x0).
The program '[3288] tagh.cpp.exe: Managed' has exited with code 0 (0x0).
The program '[3288] tagh.cpp.exe: Native' has exited with code 0 (0x0).
دوستان خواهش می کنم سریع جواب بدین چون خیلی کار دارم و باید سریع عیب هامو بر طرف کنم