Mã chấm Tài khoản Bài tập Ngôn ngữ lập trình Trạng thái Thời gian Bộ nhớ Kích thước Thời gian nộp
268115 Phạm Huỳnh Hưng Ministop HUTECH C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 685 2023-11-18 19:51:24

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:9:10: error: ‘cout’ is not a member of ‘std’
     std::cout << "Nhập số quyển vở vô cần mua thêm (A): ";
          ^~~~
Main.cc:9:10: note: suggested alternative: ‘cbrt’
     std::cout << "Nhập số quyển vở vô cần mua thêm (A): ";
          ^~~~
          cbrt
Main.cc:10:10: error: ‘cin’ is not a member of ‘std’
     std::cin >> A;
          ^~~
Main.cc:10:10: note: suggested alternative: ‘sin’
     std::cin >> A;
          ^~~
          sin
Main.cc:12:10: error: ‘cout’ is not a member of ‘std’
     std::cout << "Nhập số cây bút cần mua thêm (B): ";
          ^~~~
Main.cc:12:10: note: suggested alternative: ‘cbrt’
     std::cout << "Nhập số cây bút cần mua thêm (B): ";
          ^~~~
          cbrt
Main.cc:13:10: error: ‘cin’ is not a member of ‘std’
     std::cin >> B;
          ^~~
Main.cc:13:10: note: suggested alternative: ‘sin’
     std::cin >> B;
          ^~~
          sin
Main.cc:15:10: error: ‘cout’ is not a member of ‘std’
     std::cout << "Nhập giá tiền của mỗi quyển vở và (X): ";
          ^~~~
Main.cc:15:10: note: suggested alternative: ‘cbrt’
     std::cout << "Nhập giá tiền của mỗi quyển vở và (X): ";
          ^~~~
          cbrt
Main.cc:16:10: error: ‘cin’ is not a member of ‘std’
     std::cin >> X;
          ^~~
Main.cc:16:10: note: suggested alternative: ‘sin’
     std::cin >> X;
          ^~~
          sin
Main.cc:18:10: error: ‘cout’ is not a member of ‘std’
     std::cout << "Nhập giá tiền của mỗi cây bút (Y): ";
          ^~~~
Main.cc:18:10: note: suggested alternative: ‘cbrt’
     std::cout << "Nhập giá tiền của mỗi cây bút (Y): ";
          ^~~~
          cbrt
Main.cc:19:10: error: ‘cin’ is not a member of ‘std’
     std::cin >> Y;
          ^~~
Main.cc:19:10: note: suggested alternative: ‘sin’
     std::cin >> Y;
          ^~~
          sin
Main.cc:23:10: error: ‘cout’ is not a member of ‘std’
     std::cout << "Số tiền ít nhất bạn cần mang theo để trả tiền là: " << totalPrice << " đồng" << std::endl;
          ^~~~
Main.cc:23:10: note: suggested alternative: ‘cbrt’
     std::cout << "Số tiền ít nhất bạn cần mang theo để trả tiền là: " << totalPrice << " đồng" << std::endl;
          ^~~~
          cbrt
Main.cc:23:126: error: ‘endl’ is not a member of ‘std’
     std::cout << "Số tiền ít nhất bạn cần mang theo để trả tiền là: " << totalPrice << " đồng" << std::endl;
                                                                                                                              ^~~~