#include <iostream>
#include <string>
#include <Windows.h>
using namespace std;
int main() {
SetConsoleTitleW(L"TBPACH OS V 1.0");
string command, file;
while (true) {
puts("ECTOS V 1.0");
cout << ":~$ ";
cin >> command;
if (command == "?") {
puts("CREATED BY TBPACH | TECHNOLOGY BY PECHENKIN AND CHERTOLIN\n\n");
puts("? - COMMAND LIST\n");
puts("list - BROWSING FILES\n");
puts("open - OPEN FILES\n");
puts("calc - PERFORM A NUMERICAL OPERATION\n");
puts("off - POWER OFF\n");
puts("\nPRESS ANY KEY TO EXIT");
system("pause > nul");
} else if (command == "list") {
cout << "Enter the path: ";
cin >> file;
} else if (command == "open") {
// TODO:
} else if (command == "calc") {
// TODO:
} else if (command == "off") {
break;
}
system("cls");
}
}
#include <iostream>
using namespace std;
int main()
{
char* command, file;
int start;
start = 1;
cout << "TBPACH OS V 1.0" << endl;
while(start = 1)
{
cout << ":~$ ";
cin >> command;
if(command == "?")
{
system("cls");
cout << "ECTOS V 1.0" << endl;
cout << "CREATED BY TBPACH | TECHNOLOGY BY PECHENKIN AND CHERTOLIN" << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
cout << "? - COMMAND LIST" << endl;
cout << " " << endl;
cout << "list - BROWSING FILES" << endl;
cout << " " << endl;
cout << "open - OPEN FILES" << endl;
cout << " " << endl;
cout << "calc - PERFORM A NUMERICAL OPERATION" << endl;
cout << " " << endl;
cout << "off - POWER OFF" << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
cout << "PRESS ANY KEY TO EXIT" << endl;
system("PAUSE>nul");
system("cls");
cout << "ECTOS V 1.0" << endl;
}
if(command == "list")
{
system("cls");
cout << "Enter the path" << endl;
cin >> file;
system("cls");
}
}
}
компилируется нормально, а когда запускается после ввода пишет выход с кодом 3221225477. Что делать?