Em có một đoạn mã đơn giản như sau
Cùng đoạn này khi dịch ở Visual C++ 6.0 trên máy ở phòng kỹ thuật ghép nối trên trường thì chạy ầm ầm. Loa nhỏ trong máy tính kêu khá to. Tuy nhiên khi dịch ở nhà thì nó báo lỗi:
error C2065: 'outportb' : undeclared identifier
error C2065: 'Sleep' : undeclared identifier
Tại sao lại thế nhỉ.
Code:
#include "stdafx.h"
#include "dos.h"
int main(int argc, char* argv[])
{
outportb(0x43,0xB6);
outportb(0x42,4235);
outportb(0x42,4235>>8);
Sleep(1000);
return 0;
}
error C2065: 'outportb' : undeclared identifier
error C2065: 'Sleep' : undeclared identifier
Tại sao lại thế nhỉ.

Comment