int f (void) { return 1; }
int f (int) { return 0; }
void g (void) { int i = f(), j = f(0); }
int __f_v (void) { return 1; }
int __f_i (int) { return 0; }
void __g_v (void) { int i = __f_v(), j = __f_i(0); }
// 将下面的代码保存为.cpp文件,并用C++编译器编译
int printf(const char *format,...);
int main()
{
printf("GeeksforGeeks");
return 0;
}
/tmp/ccQBO9Im.o:在函数‘main'中: test.cpp:(.text+0xf):对‘printf(char const*, ...)'未定义的引用 collect2: 错误:ld 返回 1
extern "C"
{
int printf(const char *format,...);
}
int main()
{
printf("Hello!");
return 0;
}
#ifdef __cplusplus
extern "C" {
#endif
/* Declarations of this file */
#ifdef __cplusplus
}
#endif
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有