0
,我有以下問題,當我調試代碼:原住民」已退出,代碼爲3段(0x3)
// Croppen.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include "stdlib.h"
int i,j,c;
char hex[] = {"header.hex"},
ziel[] = {"ergebniss.bmp"},
eingabe[100];
FILE *f,*h;
int _tmain(int argc, _TCHAR* argv[])
{
{//eingabe des Orginalen Bildnamens
printf("Bitte geben sie den Bild namen ein. Maxiaml 20 Zeichen, mit '.bmp'\n");
do { scanf("%s", eingabe); } while (getchar() != '\n');
if ((f = fopen(eingabe,"rb")) == NULL)
{
printf("Fehler beim Öffnen von %s\n",eingabe);
system("exit");
}
}
{//header einlesen
h = fopen(hex,"wb");
for (i = 0; i < 52; i++) { putc(getc(f),h); }
}
return 0;
}
產生以下錯誤:
'Croppen.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Symbols loaded (source information stripped).
The program '[2884] Croppen.exe: Native' has exited with code 3 (0x3).
任何一個可以說得清我的問題是?
我使用MS VS 2010 Prof IDE。
你有什麼理由爲什麼你使用C風格的字符串和C風格的函數,如'fopen'? – LihO
什麼是'system(「exit」)'? –
是的,它是一個ca 2000打開的promam,關閉其他E/A突擊隊隊員,我不想在可能的情況下更改它們。系統( 「退出」);來了vome好老DOS它很容易關閉程序 –