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它很容易关闭程序 –