Mình đang học bài CIN bài 1, trong phần học C++. Mình code trong code::Clock thì không bị lỗi. Nhưng khi code trong Visual Studio thì lại bị lỗi, như dưới đây.
//
Error C2065 'cout': undeclared identifier thuchanh-cin
Error C2065 'cin': undeclared identifier thuchanh-cin
Error C2065 'cout': undeclared identifier thuchanh-cin
Error C3861 'system': identifier not found thuchanh-cin
\\
Có bạn nào biết mình bị lỗi gì không chỉ mình với. thanks
màng hình code của mình trong visual studio:
#include <iostream>
#include <string>
#include "stdafx.h"
using namespace std;
void main()
{
int tuoi;
cout << " ban bao nhieu tuoi:";
cin >> tuoi;
cout << tuoi;
system("pause");
}