如何将包含字母,数字和符号的字符串转换为具有ascii数字的双精度字符
#include "pch.h"
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
using namespace std;
int main()
{
string one;
long double file_ascii;
ifstream PW_File;
PW_File.open("PW.STORED");
char output[100];
if (PW_File.is_open()) {
while (!PW_File.eof()) {
PW_File >> output;
cout << output << "\n\n\n\n";
one = output;
file_ascii = stoi(one);
cout << file_ascii;
}
}
PW_File.close();
return 0;
}
我认为您对字符串,字符和数字感到困惑