fixed some small problems

This commit is contained in:
ishak jmilou.ishak
2024-10-08 12:41:12 +02:00
parent 06f152d455
commit 3f5c352451

View File

@@ -8,8 +8,8 @@ using namespace std;
CKobuki robot;
int command();
const int forward = 1;
const int ROTATE = 2;
const char forward = '1';
const char rotate = '2';
int main() {
unsigned char *null_ptr(0);
@@ -43,14 +43,14 @@ int command() {
switch (input) {
case forward: {
int distance;
std::cout >> "Enter distance to move forward: ";
std::cout << "Enter distance to move forward: ";
cin >> distance;
robot.goStraight(distance);
} break;
case ROTATE: {
int angle;
std::cout >> "Enter angle to rotate: ";
std::cout << "Enter angle to rotate: ";
std::cin >> angle;
robot.doRotation(angle);
robot.goStraight(-1);