• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






LeahLCY

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2018年2月27日

leetcode做题中的一些小总结,很分散,待整理
摘要: 1.需要#include <ctype.h> 才能用toupper,tolower,即大小写转换 char c = str[i] >= 'a' ? toupper(str[i]) : tolower(str[i]); 2.vector<int>(n,i);:初始化大小为n,初值为i的vector s 阅读全文
posted @ 2018-02-27 16:29 LeahLCY 阅读(156) 评论(0) 推荐(0)
 

2018年2月23日

c++ int,string 互转
摘要: int 转string: #include<sstream> string str = "123"; int i; stringstream ss; ss<<str; ss>>i; string 转int: string str; int n = atoi(str.c_str()); 或; int 阅读全文
posted @ 2018-02-23 13:36 LeahLCY 阅读(97) 评论(0) 推荐(0)
 

2018年2月11日

answer for leetcode(cpp)
摘要: 1. reverse integer int reverse(int x){ long long temp = 0; while (x) { temp = temp * 10 + x % 10; x = x / 10; } if (temp>INT_MAX || temp< INT_MIN) { r 阅读全文
posted @ 2018-02-11 11:30 LeahLCY 阅读(110) 评论(0) 推荐(0)
 

2018年2月9日

answer for zoj(cpp)
摘要: 1001. #include <iostream>using namespace std; int main(){ int a, b; while (cin>>a>>b) { cout << a + b << endl; }} tips:如果用到cin>> 或 cout<< ,需要: using n 阅读全文
posted @ 2018-02-09 15:59 LeahLCY 阅读(114) 评论(0) 推荐(0)
 
Unknown module(s) in Qt:qml quick
摘要: 这是我的第一个qml程序遇到的问题。原因应该是缺少某依赖,需要安装库,Ubuntu系统解决方案: 打开终端,apt-get install qtdeclarative5-dev 如果出现: E: Could not open lock file /var/lib/dpkg/lock - open ( 阅读全文
posted @ 2018-02-09 11:22 LeahLCY 阅读(978) 评论(0) 推荐(0)