12345678910111213141516171819202122232425
#include <iostream> #include <string> #include <fstream> using namespace std; int main () { char menu; cin>>menu; if(menu=='a'){ string message; ofstream code; char coder; cout << "Please enter full name: "; getline (cin,message); code.open("code.txt"); for (size_t i=0; i < message.length(); i++){ coder=message.at(i); code<<(int)coder; code<<" "; } code.close(); } return 0; }