Skip to content

Commit bf85b6f

Browse files
committed
Create linuxPulsar.cpp
1 parent 9465a74 commit bf85b6f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include "linuxPulsar.h"
2+
#include <iostream>
3+
#include <cstdlib>
4+
#include <string>
5+
6+
using namespace std;
7+
8+
9+
int commandAnalyze(string line){
10+
if (line.empty()) {
11+
return 0;
12+
}
13+
else if (line.starts_with("//")) {
14+
return 0;
15+
}
16+
else if (line == "exit") {
17+
return 0101;
18+
}
19+
else {
20+
cout << "Ошибка: Команда не распознана. Введите 'help' для справки." << endl;
21+
}
22+
}
23+
24+
int pulsarStart(){
25+
string com;
26+
while (true) {
27+
getline(cin, com);
28+
com.erase(0, com.find_first_not_of(' '));
29+
com.erase(com.find_last_not_of(' ') + 1);
30+
int code = commandAnalyze(com);
31+
if(code==0101){}
32+
}
33+
return 0;
34+
}

0 commit comments

Comments
 (0)