私的メモね〜

#include
#include
#include
#include
int Get_str_2byte( int c );

int main()
{
char s[255],str[255],*str_p,*str_p2;
char a[2];
int error_c,i=0,dust=0;
GetPrivateProfileString("Section3", "Key00", "not_use", s, 255, "./h.ini" );
while(s[i]!=NULL)
{
sprintf(str,"%c",s[i]);
str_p=str;
error_c=Get_str_2byte(*str_p);
if(error_c==0)
{//英語数学領域
printf("英語or数字:%s\n",str);
}else if(error_c==1)
{//ひらがな領域
i++;
sprintf(str,"%c",s[i]);
str_p=str;
sprintf(a,"%s","ぁ");
str_p2=a+1;
printf("ひらがな:%d\n",*1;
return j;
}

*1:*str_p&0x000000FF)-(*str_p2&0x000000FF))); }else if(error_c==2) {//カタカナ領域 i++; sprintf(str,"%c",s[i]); str_p=str; sprintf(a,"%s","ァ"); str_p2=a+1; printf("カタカナ:%x\n",((*str_p&0x000000FF)-(*str_p2&0x000000FF))); } i++; } printf("\n%s",s); return 0; } int Get_str_2byte( int c ) { int j=0; if( (c&0x000000FF) == 0x82 ){ j=1; //一バイト目がひらがなの領域 }else if((c&0x000000FF) == 0x83){ j=2; //一バイト目がカタカナの領域 }else{ j=0; }//一バイト目がそれ以外の領域 printf("ErrorCode==%x",(c&0x000000FF