会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
spron
不止所见,见所未见!
博客园
首页
新随笔
联系
订阅
管理
2016年7月12日
C/C++中如何在main()函数之前执行一条语句?
摘要: 在C语言中,如果使用GCC的话,可以通过attribute关键字声明constructor和destructor(C语言中如何在main函数开始前执行函数) #include <stdio.h> __attribute((constructor)) void before_main() { prin
阅读全文
posted @ 2016-07-12 14:41 不止所见
阅读(4737)
评论(1)
推荐(0)
公告