小编cha*_*rma的帖子

如何仅为代码中的c和h文件创建ctags

我有一个编译代码.如果我尝试使用'usr/bin/ctags -R*'生成标签,它将包括所有c,h,目标文件等.因此它需要花费大量时间和内存.能告诉我如何仅为c/h文件生成标签吗?

c tags ctags

9
推荐指数
2
解决办法
7066
查看次数

在C中没有fclose的fopen

如果我打开使用文件,会发生什么fopen有些ň的次数,而无需调用fclose就可以了?

可能出现任何缓冲区溢出问题?

c file-io file

6
推荐指数
2
解决办法
8238
查看次数

函数指针用法

可能重复:
如何解除引用函数指针?

大家好,为什么这两个代码给出相同的输出,案例1:

#include <stdio.h>

typedef void (*mycall) (int a ,int b);
void addme(int a,int b);
void mulme(int a,int b);
void subme(int a,int b);

main()
{
    mycall x[10];
    x[0] = &addme;
    x[1] = &subme;
    x[2] = &mulme;
    (x[0])(5,2);
    (x[1])(5,2);
    (x[2])(5,2);
}

void addme(int a, int b) {
    printf("the value is %d\n",(a+b));
}
void mulme(int a, int b) {
    printf("the value is %d\n",(a*b));
}
void subme(int a, int b) {
    printf("the value is %d\n",(a-b));
}
Run Code Online (Sandbox Code Playgroud)

输出:

the value is 7
the …
Run Code Online (Sandbox Code Playgroud)

c++ function-pointers

3
推荐指数
1
解决办法
306
查看次数

标签 统计

c ×2

c++ ×1

ctags ×1

file ×1

file-io ×1

function-pointers ×1

tags ×1