栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

codeblocks(自带编译器的zip版)下载

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

codeblocks(自带编译器的zip版)下载

操作系统:Windows10。编译器是MingW(gcc的windows实现)。

①下载

进入Binary releases - Code::Blocks

下载.zip解压后 点击CbLauncher.exe 就打开了。

②设置C++11.  setting -> compiler

运行

③设置运行快捷键 setting -> editor 。添加快捷键时需要敲击你想要的键盘按键

④调出底端界面(运行报错信息在此)View -> perspective -> default 或者 delete current。

 ⑤测试(遍历某文件夹下的文件,Linux和Windows上通用;io.h的方式只能用于Windows)

#include 
#include 
#include 

#include 
using namespace std;
int main(int argc,char *argv[])
{

	DIR *dp;
	struct dirent *dirp;
	int n=0;
	if((dp=opendir("C:\Users\"))==NULL)
		printf("can't open the dir !");
    cout << "Your dir must include two d_name, it`s '.' and '..'" << std::endl;
	while (((dirp=readdir(dp))!=NULL) && (n<=450))
	{
		n++;
		printf("%-6d%sn", n, dirp->d_name);
	}
	printf("n");
	closedir(dp);

	return 0;
}

io.h遍历的方式在Linux平台上 一般不能正常编译,报错为【fatal error: io.h: No such file or Directory #include

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/718132.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号