We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a00caef commit fb78dd1Copy full SHA for fb78dd1
cpp/koishi/src/koishi.cpp
@@ -1,6 +1,6 @@
1
#include "../include/koishi.hpp"
2
LEVEL getlevel(){
3
- char l;
+ short int l;
4
std::cout << "please input the level number:" << std::endl <<
5
"1.easy" << std::endl <<
6
"2.normal" << std::endl <<
@@ -9,5 +9,5 @@ LEVEL getlevel(){
9
std::cin >> l;
10
std::cin.clear();
11
std::cin.ignore(1024,'\n');
12
- return (LEVEL)(l-48);
+ return (LEVEL)l;
13
}
0 commit comments