自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

leo1949asd的专栏

把学习变成习惯,就再也不会偷懒了!Motivation gets you started HABIT keeps you going!

  • 博客(23)
  • 资源 (4)
  • 收藏
  • 关注

原创 淡入淡出启动画面的制作

http://down.51cto.com/data/133335CSplashWnd.h#pragma once#include "afxwin.h"// CSplashWndclass CSplashWnd : public CWnd{ DECLARE_DYNAMIC(CSplashWnd)public: CSplashWnd(UINT nBitmapID);

2015-03-31 13:24:41 744

原创 多线程测试

#include #include #include #include using namespace std;int count_test = 100;HANDLE m_mutex = NULL;DWORD WINAPI thread1(LPVOID lparam);DWORD WINAPI thread2(LPVOID lparam);int main(){

2015-03-30 17:08:35 422

原创 写一个函数,输入int型,返回整数逆序后的字符串。如:输入123,返回“321”。 要求必须用递归,不能用全局变量,输入必须是一个参数,必须返回字符串

看了一下这个文章http://www.codeceo.com/article/alibaba-interview-java.html顺手写了下 应该符合题目意思吧~~#include #include #include using namespace std;string intTostring(int n){ string tem; if(n /10 == 0) {

2015-03-30 14:44:08 3557

转载 简析TCP的三次握手与四次分手

http://www.codeceo.com/article/tcp-3-hand.htmlTCP是什么?具体的关于TCP是什么,我不打算详细的说了;当你看到这篇文章时,我想你也知道TCP的概念了,想要更深入的了解TCP的工作,我们就继续。它只是一个超级麻烦的协议,而它又是互联网的基础,也是每个程序员必备的基本功。首先来看看OSI的七层模型:我们需要知道TCP工

2015-03-30 10:47:43 564

转载 C++打开(弹出)指定路径文件夹

有时候我们需要利用代码将指定路径(folderpath)的文件夹打开(效果相当于我们双击了此文件夹),为了方便初次遇到这个问题的朋友,以下我罗列了几种可用的方法:         方法一:System("start     folderpath");         方法二:System("explorer.exe     folderpath");         方法三

2015-03-26 19:48:26 5092

转载 测试MapWindowGis控件

MapWinGIS是一个著名的开源的ActiveX组件,功能上类似MapX(网上就有人以其代替MapInfo的著名组件MapX)。我用VS C++ 2005编写了一个例程,发现果然不错(开发环境为:VS C++ 2005+sp1,Win XP+sp3)。     首先使用VS C++ 2005新建一个单文档工程:VisualDivision。然后注册MapWinGIS Active

2015-03-24 16:29:43 659

转载 Linux Socket编程(不限Linux)

我们深谙信息交流的价值,那网络中进程之间如何通信,如我们每天打开浏览器浏览网页时,浏览器的进程怎么与web服务器通信的?当你用QQ聊天时,QQ进程怎么与服务器或你好友所在的QQ进程通信?这些都得靠socket?那什么是socket?socket的类型有哪些?还有socket的基本函数,这些都是本文想介绍的。本文的主要内容如下:1、网络中进程之间如何通信?2、Socket是什么?

2015-03-18 19:21:15 327

转载 大端序与小端序

何为大端序,小端序?简单点说,就是字节的存储顺序,如果数据都是单字节的,那怎么存储无所谓了,但是对于多字节数据,比如int,double等,就要考虑存储的顺序了。注意字节序是硬件层面的东西,对于软件来说通常是透明的。再说白一点,字节序通常只和你使用的处理器架构有关,而和编程语言无关,比如常见的Intel x86系列就是小端序。Big-endian(大端序)数据的高位字节存放在地址的

2015-03-18 14:34:53 568

原创 151 Reverse Words in a String

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2015-03-15 18:32:22 470

原创 1 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe

2015-03-15 16:29:56 377

原创 7 Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321class Solution {public: int reverse(int x) { int flag = 1; if(x==0) return 0;

2015-03-14 16:24:13 394

原创 190 Reverse Bits

Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as00111001011110

2015-03-14 16:07:11 514

转载 C中如何调用C++函数?

前阵子被问及一个在C中如何调用C++函数的问题,当时简单回答是将函数用extern "C"声明,当被问及如何将类内成员函数声明时,一时语塞,后来网上查了下,网上有一翻译C++之父的文章可以作为解答,遂拿来Mark一下。 将 C++ 函数声明为``extern "C"''(在你的 C++ 代码里做这个声明),然后调用它(在你的 C 或者 C++ 代码里调用)。例如:// C++ code

2015-03-13 16:00:47 429

转载 当你在浏览器中输入Google.com并且按下回车之后发生了什么?

本文试图回答一个古老的面试问题:当你在浏览器中输入Google.com并且按下回车之后发生了什么?不过我们不再局限于平常的回答,而是想办法回答地尽可能具体,不遗漏任何细节。这将是一个协作的过程,所以深入挖掘吧,并且帮助我们一起完善它。仍然有大量的细节等待着你来添加,欢迎向我们发送Pull Requset!这些内容使用 Creative Commons Zero 协议发布。

2015-03-13 15:34:39 721

原创 8 String to Integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca

2015-03-10 19:37:35 459

原创 172 Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.找规律http://www.geeksforgeeks.org/count-trailing-zeroes-factorial-

2015-03-10 16:05:17 381

原创 191 Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 000000

2015-03-10 15:21:10 432

原创 118 Pascal's Triangle

Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]class Solution {public: 

2015-03-10 14:41:44 468

原创 58 Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is

2015-03-10 14:07:44 528

原创 112 Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum

2015-03-09 15:10:07 399

原创 111 Minimum Depth of Binary Tree

Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.

2015-03-09 12:28:43 592

原创 165 Compare Version Numbers

/**------------------------------------ * 日期:2015-03-09 * 作者:pqleo * 题目: 165 Compare Version Numbers * 网址:https://leetcode.com/problems/compare-version-numbers/ * 结果:AC

2015-03-09 10:06:56 423

转载 stringstream的用法

http://www.cppblog.com/Sandywin/archive/2007/07/13/27984.html使用stringstream对象简化类型转换C++标准库中的提供了比ANSI C的更高级的一些功能,即单纯性、类型安全和可扩展性。在本文中,我将展示怎样使用这些库来实现安全和自动的类型转换。为什么要学习如果你已习惯了风格的转换,也许你首先会问:为

2015-03-09 09:27:21 413

c++入门进阶书籍

2-4-2 C++编程新手互动教程.pdf Accelerated C++中文版.pdf C++程序设计语言题解.pdf

2014-04-06

1-2-2 C++语言的设计和演化.pdf

1-2-2 C++语言的设计和演化.pdf

2014-04-06

1-1-2 C++程序设计语言(特别版)

1-1-2 C++程序设计语言(特别版)

2014-04-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除