惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

Lan小站-嗯,不错! - C

C++ string转CString - Lan小站-嗯,不错! c++的WS2tcpip和thread的bind冲突怎么解决 - Lan小站-嗯,不错!
Visual Studio Code配置C环境,运行C程序 - Lan小站-嗯,不错!
Lan · 2022-02-01 · via Lan小站-嗯,不错! - C

祝大家新年快乐

大家新年好,大年初一就开始卷起来了。

安装环境

1.VS Code安装插件

我安装了这四个插件(其实我一开始只装了第二个,好像后面几个是自己带的)
VS Code插件

2.安装C/C++编译器

在windows上借助MinGW工具安装,下载地址:[https://sourceforge.net/projects/mingw/]
这里帮大家整理到我的OD了,可以直接点击下载.

下载之后,打开安装,需要记住装到哪个目录了.
比如我就安装在D:\Program Files (x86)\MinGW

安装完成之后打开新安装的这个软件.

找到mingw32-gcc.bin,mingw32-gcc-g++.bin,mingw32-gdb.bin然后右键Mark for installation
安装
最后在左上角的installation点击apply changes
应用安装
最后安装完成
b编译器安装完成

3.配置到系统变量

找到安装目录下的bin,然后复制路径
bin
打开环境变量->系统变量->path
进行添加
环境变量

4.重启VS code

新建一个.c文件

#include <stdio.h>

int main()
{
    int n;
    printf("This is a test file!\r\nInput a number: ");
    scanf("%d",&n);
    printf("The number is %d",n);
    return 0;
}

打开一个新的终端
然后输入gcc -g test.c -o test.exe编译成exe文件.
编译exe
然后再打开exe文件
调试