Home > Development Tools > VSCode > body text

vscode compile c console output garbled code

王林
Release: 2020-02-13 13:11:36
Original
3387 people have browsed it

vscode compile c console output garbled code

Just change the encoding method of cmd or vscode. The specific method is as follows:

1. Enter the directory where the program is located and run the program. For example, my cpp program is in D:/c/test.exe:

2. After entering cmd, enter the following command:

D:    进入到驱动器
cd c    进入到 c 目录下
chcp 65001    转换编码方式
test.exe    运行程序
Copy after login

3. You can use the character encoding as utf-8 Next, the program will output Chinese.

vs code console:

chcp 65001
.\test.exe
Copy after login

Recommended related articles and tutorials: vscode tutorial

The above is the detailed content of vscode compile c console output garbled code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template