2015年11月3日

LeetCode--Add Digits

摘要: 题目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process i... 阅读全文

posted @ 2015-11-03 10:45 小二杰 阅读(94) 评论(0) 推荐(0) 编辑

LeetCode--Nim Game

摘要: 题目: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to ... 阅读全文

posted @ 2015-11-03 10:32 小二杰 阅读(125) 评论(0) 推荐(0) 编辑

2015年7月30日

用qt的图形视图框架实现的圆,三角形,矩形运动及碰撞.

摘要: 用qt的图形视图框架实现的圆,三角形,矩形运动及碰撞. 效果如图: /*main.cpp*/#include "project.h"#include int main(int argc, char *argv[]){ QApplication a(argc, argv); Projec... 阅读全文

posted @ 2015-07-30 18:43 小二杰 阅读(1766) 评论(0) 推荐(0) 编辑

用qt的图形视图框架实现的五子棋

摘要: 用qt的图形视图框架实现的五子棋. 效果如图: /*MainWindow.h*/ #ifndef MAINWINDOW_H#define MAINWINDOW_H#include #include "ui_mainwindow.h"#include #include #include #in... 阅读全文

posted @ 2015-07-30 18:38 小二杰 阅读(666) 评论(0) 推荐(0) 编辑

2015年7月23日

数据结构学习--创建链表

摘要: #include "stdio.h"#include "stdlib.h"struct pass{ int number; struct pass *next;};struct pass * createList(struct pass *head){ int i = 0; struct pas... 阅读全文

posted @ 2015-07-23 20:52 小二杰 阅读(109) 评论(0) 推荐(0) 编辑

2015年7月21日

c++书籍

摘要: 1. 入门 1. 《C++ Primer中文版(第4版)》 2. 《C++程序设计语言(特别版)》 3. 《C++标准程序库(侯捷译)》 4. 《数据结构与算法分析.C语言描述》 5. 《数据结构(C语言版)》 6. … ... 阅读全文

posted @ 2015-07-21 17:34 小二杰 阅读(213) 评论(0) 推荐(0) 编辑

2015年7月20日

Qt中show()与exec()

摘要: 1. show()默认显示的是非模态对话框,即此对话框出现后你还可以对其他窗口进行操作,可以用setModal函数进行设置窗口为模态,即无法操作其他窗口,即被阻塞. 而exec()出现的只能是模态对话框. 2. show()显示的窗口无论是否模态,都立刻将操作权返回, 运行下面代码;而exec... 阅读全文

posted @ 2015-07-20 21:17 小二杰 阅读(5365) 评论(0) 推荐(0) 编辑

导航