13/11/2026

HƯỚNG DẪN SỬ DỤNG TIẾNG VIỆT TRONG NGÔN NGỮ LẬP TRÌNH C, C++


Các bước thực hiện:

1. Tải phần mềm: Embarcadero-Dev-C++ V.6.3

2. Mở Embarcadero-Dev-C++, sau đó vào menu Tools/Editor Options => General => Trong mục New Document Encoding chọn UTF-8


2. Gõ Tiếng Việt trong Embarcadero-Dev-C++: Khởi động lại UniKey với quyền Admin

3. Ví dụ:

#include <iostream>
#include <windows.h> // Thư viện chứa hàm SetConsoleOutputCP
using namespace std;
int main() {
    // Thiết lập mã hóa UTF-8 cho Console
    SetConsoleOutputCP(65001);
    SetConsoleCP(65001);
    cout << "Xin chào, đây là tiếng Việt trong Embarcadero-Dev-C++ V.6.3!" << endl;
    system("pause"); // Dừng màn hình và hiện dòng "Press any key to continue..."
    return 0;
}