上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 74 下一页
该文被密码保护。 阅读全文
posted @ 2023-05-18 09:55 opensmarty 阅读(0) 评论(0) 推荐(0)
摘要: ListView是一个经常用到的控件,ListView里面的每个子项Item可以是一个字符串,也可以是一个组合控件。先说说ListView的实现: 1.准备ListView要显示的数据 ; 2.使用 一维或多维 动态数组 保存数据; 3.构建适配器 , 简单地来说, 适配器就是 Item数组 , 动 阅读全文
posted @ 2023-05-17 09:51 opensmarty 阅读(71) 评论(0) 推荐(0)
摘要: 1、Android屏幕常亮/点亮 //保持屏幕常亮 PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_ 阅读全文
posted @ 2023-05-16 14:11 opensmarty 阅读(387) 评论(0) 推荐(0)
摘要: 直接上错误代码实例 #include <iostream.h> int main() { print('hello, world\n') return 0; } 编译通不过,直接出错 这是C语言转C++的两条经典错误 C++中是没有iostream.h这个东西的(或者一般不会这么使用),正确用法是: 阅读全文
posted @ 2023-04-24 18:17 opensmarty 阅读(658) 评论(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 阅读(1586) 评论(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 阅读(1962) 评论(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 阅读(170) 评论(0) 推荐(0)
摘要: C++ STL中的verctor好比是C语言中的数组,但是vector又具有数组没有的一些高级功能。与数组相比,vector就是一个可以不用再初始化就必须制定大小的边长数组,当然了,它还有许多高级功能。 1.头文件 #include <vector> 2.初始化 如果vector的元素类型是int, 阅读全文
posted @ 2023-04-23 19:28 opensmarty 阅读(1466) 评论(0) 推荐(0)
摘要: std::string::nposstd::string::npos是一个常数,它等于size_type类型可以表示的最大值,用来表示一个不存在的位置,类型一般是std::container_type::size_type。 定义static const size_type npos = -1; # 阅读全文
posted @ 2023-04-23 15:49 opensmarty 阅读(264) 评论(0) 推荐(0)
摘要: 一、关于npos的定义 在MSDN中有如下说明:basic_string::nposstatic const size_type npos = -1;//定义The constant is the largest representable value of type size_type. It i 阅读全文
posted @ 2023-04-23 15:40 opensmarty 阅读(2476) 评论(0) 推荐(1)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 74 下一页