C++ 与 C 的预处理能力

#include <stdio.h>                                                                                                 

int main(void)
{
    const int first = 5;

    int second = 8;
    int *p = (int *) &first; 

    *p = 6; 

    second = first;

    printf("second %d  first %d\n", second, first); 

    printf("content of p %d\n", *p);

    return 0;
}

C++:5 5             6

C:6 6 6

posted on 2013-02-27 12:53  阿加  阅读(148)  评论(0编辑  收藏  举报

导航