C/C++の宿題を片付けます 86代目
■ このスレッドは過去ログ倉庫に格納されています
0579ぺこちゃん
2007/05/03(木) 22:00:25#include<string.h>
#include<ctype.h>
#define MAX_CONVERT_LENGTH 100
const char *ConvertToUpper( const char *pcLower)
{
char Upper[MAX_CONVERT_LENGTH + 1];
const char *pc = pcLower;
int nUpperldx = 0;
for ( ; *pc!='\0'; pc++ ){
if( nupperldx < MAX_CONVERT_LENGTH ){
UPPER[nUpperldx] = toupper( *pc );
nUpperldx ++;
}
else{
break;
}
}
Upper[nUppreldx] = '\0';
return Upper;
}
■ このスレッドは過去ログ倉庫に格納されています