0
点赞
收藏
分享

微信扫一扫

eclipse c++ 配置gcc参数,支持三字符组


eclipse c++ 配置gcc参数,支持三字符组

问题描述:gcc或mingw64默认不支持三字符组

解决方法:添加 -ansi -trigraphs 参数即可
[Properties] → [C/C++ Build] → [Settings] → [Tool Settings] → [GCC C Compiler] → [Command line pattern]

eclipse c++ 配置gcc参数,支持三字符组_eclipse c++

测试代码

#include<stdio.h>

/*
 * C语言 三字符组
 * 个人不推荐混合使用
 * */
int main() {
	printf( "??(\n" );
	printf( "??)\n" );
	printf( "??<\n" );
	printf( "??>\n" );
	printf( "??/\\n" );
	printf( "??!\n" );
	printf( "??'\n" );
	printf( "??-\n" );
	printf( "??=\n" );
}

运行结果

[
]
{
}
\
|
^
~
#
 

举报

相关推荐

0 条评论