<分区>
我在浏览代码库时发现了这个
typedef long long int (stoll_t)(const char *, char **, int);
不知道它的作用是什么? 以及如何调用这个函数?
在代码中是这样的
long long int argtoll( const char *str, const char **end, stoll_t stoll); //this
<分区>
我在浏览代码库时发现了这个
typedef long long int (stoll_t)(const char *, char **, int);
不知道它的作用是什么? 以及如何调用这个函数?
在代码中是这样的
long long int argtoll( const char *str, const char **end, stoll_t stoll); //this
最佳答案
typedef long long int (stow)(const char *, char **, int);
将 stow
定义为一个类型。
那个类型是 function (pointer to const char, pointer to pointer to char, int) returning long long int .
long long int example_function_of_that_type(const char *a, char **b, int c) {
if (a == NULL) return 1;
if (b == NULL) return 2;
return c;
}
关于c - 有谁知道这个 "typedef long long int (stoll_t)(const char *, char **, int);"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54725800/