[問題] 為何停不下來
#include <iostream>
#include <fstream>
using namespace std;
int main(){
/* read file */
char *key = "lpokmnjiuhbvgytfcxdreszawq";
ifstream fin("1.3 ciphertext.txt");
if(!fin) cout << "讀檔失敗" << endl; // 檢查讀檔成功與否
char *str, *temp;
char ch;
temp = str;
while(fin.get(ch)!='\0'){
*str = ch;
str++;
}
str = temp;
/* start */
while(*str != '\0'){
if(*str!=' ')
cout << key[*str - 97];
str++;
}
system("PAUSE");
//fin.close(); // 關閉檔案
return 0;
}
我有加system("pause");
煩請高手幫忙解惑
謝謝~!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.116.218.120
推
03/13 22:25, , 1F
03/13 22:25, 1F
→
03/13 22:25, , 2F
03/13 22:25, 2F
→
03/13 22:27, , 3F
03/13 22:27, 3F
→
03/13 22:27, , 4F
03/13 22:27, 4F
推
03/13 22:28, , 5F
03/13 22:28, 5F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章