摘要: 直接上错误代码实例 #include <iostream.h> int main() { print('hello, world\n') return 0; } 编译通不过,直接出错 这是C语言转C++的两条经典错误 C++中是没有iostream.h这个东西的(或者一般不会这么使用),正确用法是: 阅读全文
posted @ 2023-04-24 18:17 opensmarty 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 在运行指针时终端出现error: ‘::main’ must return ‘int’ void main()错误。源代码如下: #include<stdio.h> void main() { int a,*p,b,c,d,e; a=100; p=&a; /* (*&a) 先进行&a运算,得a的地址 阅读全文
posted @ 2023-04-24 18:10 opensmarty 阅读(838) 评论(0) 推荐(0) 编辑
摘要: 1、问题概述 在使用gcc编译c++代码时会出现undefined reference to `std::cout',如编译如下代码: #include<iostream> using namespace std; int main() { cout<<"Hello world!"; return 阅读全文
posted @ 2023-04-24 18:03 opensmarty 阅读(974) 评论(0) 推荐(0) 编辑
摘要: 出现背景:ant design vue pro 执行yarn run serve 解决办法: 修改src/components/NumberInfo.vue 文件中style部分 原来的: <style lang="less" scoped> @import "index"; </style> 注释 阅读全文
posted @ 2023-04-24 11:19 opensmarty 阅读(51) 评论(0) 推荐(0) 编辑