看板 C_and_CPP 關於我們 聯絡資訊
正向改寫(反著寫會頭痛) for(int i=0;i<strlen(info);i++){ int num = (int)(unsigned char)info[i]; if(num>=0x80 && num<=0xfe) { infore1[strlen(info)-2-i]=info[i]; infore1[strlen(info)-1-i]=info[i+1]; i++; } else infore1[strlen(info)-1-i]=info[i]; 另外,Ouput 寫檔直接 Output<<infore1; 個人感覺比較方便。 ※ 編輯: yenchenlan 來自: 114.40.78.119 (03/22 09:39)
james732:<< 可以用在 binary write 嗎?? (我真的不知道) 03/22 11:11
grantchiue:好像還是不行XD 我繼續試OTL 03/22 11:52
grantchiue:使用Output<<好像不會把內容清掉(?) 03/22 11:55
grantchiue:且不知道為什麼輸出檔第一行都會出現一個空的行 03/22 11:56