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

推荐订阅源

罗磊的独立博客
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
量子位
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
Jina AI
Jina AI
L
LangChain Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学

博客园 - Cheney Shen

如果将 macOS Mojave 降级为 macOS Sierra 或者更低版本 pip源提示“not a trusted or secure host” 解决 Window系统下MongoDB安装及远程访问 Windows下安装appium桌面版和命令行版 Command 'java' not found during running appium sudo npm install -g cnpm --registry=https://registry.npm.taobao.org Pycharm 中错误ImportError: No module named appium CURL并发测试POST和DELETE请求 curl如何发起DELETE/PUT请求?(备忘) Ubuntu 11.10下安装配置Zend Studio 9.0破解版详细步骤 iphone开源汇总(转) iphone开源汇总(转) python中的cursor[备忘] Intel苹果电脑Mac+Win+Linux多重系统启动(+公用分区)终极解决方案(备忘) IGT笔试题,正整数N等于M个不同的正整数之和的问题 如何通过一个结构体成员变量的地址找到该结构体的首地址?[备忘] 为特定应用程序关闭恢复窗口功能 [Mac OS X Lion][转] System Events, Key Code and Keystroke from Doug's AppleScripts Mac下Perl脚本如何运行
在main函数执行之前和执行之后执行的方法
Cheney Shen · 2011-10-30 · via 博客园 - Cheney Shen

//

//  before&after.c

//  Created by labuser on 10/30/11.

//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.

//

#include <stdio.h>

void before() __attribute__((constructor));

void after() __attribute__((destructor));

void before() {

    //printf("This is function %s\n", __func__);

    fprintf(stdout, "In %s %d\n", __func__, __LINE__);

}

void after() {

    //printf("This is function %s\n", __func__);

    fprintf(stdout, "In %s %d\n", __func__, __LINE__);

}

int main(int argc, char* argv[]) {

    atexit(after);

    printf("This is function %s\n", __func__);

    return 0;

}