int* func() {
int* p = (int*)malloc(20 * sizeof(int));
assert(p);
for (int i = 0; i < 20; i++) {
*p = 60 + i;
p++;
}
return p-20;
}
int* p = (int*)malloc(20 * sizeof(int));
assert(p);
for (int i = 0; i < 20; i++) {
*p = 60 + i;
p++;
}
return p-20;
}
2022-12-11
#include <stdio.h>
int o(int a, int b, int(*callback)())
{
int c = a + b;
int ret = (*callback)();
//printf("%d\n",ret);
int d = c + a;
return d;
}
int q()
{
printf("funcA\n");
return 0;
}
int main(int argc, char** argv)
{
o(1, 2, q);
return 0;
}
int o(int a, int b, int(*callback)())
{
int c = a + b;
int ret = (*callback)();
//printf("%d\n",ret);
int d = c + a;
return d;
}
int q()
{
printf("funcA\n");
return 0;
}
int main(int argc, char** argv)
{
o(1, 2, q);
return 0;
}
2022-07-03
感谢讲师!江湖再会!另外,总感觉这门课程更应该叫“深入浅出C++”哈哈哈,我有点C#基础,毫不掩盖地说每节课都令我感到震撼,常常感叹C++的强大。每节课都干货满满,很精炼。再次感谢!!!!!!!!!
2022-04-05
这个视频我看了好几遍,还在网上搜集了很多相关知识点,做了点笔记,分享给大家。这个链接是有道云笔记的,请放心点击。
http://note.youdao.com/noteshare?id=940250d36205ba06cb0b9c04d14273f5&sub=9728C54D57E84348B3890586996C0887
http://note.youdao.com/noteshare?id=940250d36205ba06cb0b9c04d14273f5&sub=9728C54D57E84348B3890586996C0887
2022-04-04