I already restarted my pc and I even reinstalled Visual Studio, but it does not work. Whenever I start the program, it closes again immediately afterwards.
#include <iostream>
#include <string>
using namespace std;
int main() {
char c1, c2, c3, c4, c5;
cout << "Enter five characters: ";
cin >> c1 >> c2 >> c3 >> c4 >> c5;
int c1Int = int(c1);
int c2Int = int(c2);
int c3Int = int(c3);
int c4Int = int(c4);
int c5Int = int(c5);
string cAllInt = to_string(c1Int) + to_string(c2Int) + to_string(c3Int) + to_string(c4Int) + to_string(c5Int);
cout << "ASCII Code: " << cAllInt << "." << endl;
string enteredDelar = "6810110897114";
if (cAllInt == enteredDelar) {
cout << "You entered Delar!";
}
else {
cout << "You did not enter Delar." << endl;
cout << "Because the ASCII code of " << c1 << c2 << c3 << c4 << c5 << " is not 6810110897114." << endl;
}
system("pause>0");
}