自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

转载 c++异常处理机制示例及讲解

原文链接:http://ticktick.blog.51cto.com/823160/191881下面的代码直接贴到你的console工程中,可以运行调试看看效果,并分析c++的异常机制。#include "stdafx.h" #include #include #include // 内存泄露检测机制 #define _CRTDBG_MAP_ALLOC #

2015-04-24 15:30:39 3781

原创 LeetCode-2-Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2015-04-23 21:13:39 273

原创 LeetCode-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-04-23 20:50:50 270

原创 LeetCode-55-Jump Game

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine i

2015-04-04 09:17:29 298

原创 LeetCode-4-Median of Two Sorted Arrays

题目:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).方法:将寻找中位数转化成找第K大的数;(m+n若为奇数,

2015-04-02 08:06:01 314

转载 C++中的static关键字的总结

原文链接:http://www.vckbase.com/index.php/wv/1426.htmlC++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static。前者应用于普通变量和函数,不涉及类;后者主要说明static在类中的作用。1.面向过程设计中的static1.1静态全局变量在全局变量前,加上关键字static,该变量就被定义

2015-03-28 11:36:05 320

转载 C++中的const和C中的区别

原文链接:http://blog.pfan.cn/chenhao/19844.htmlC++中的const正常情况下是看成编译期的常量,编译器并不为const分配空间,只是在编译的时候将期值保存在名字表中,并在适当的时候折合在代码中.所以,以下代码:#include using namespace std;int main(){ const int a = 1; const

2015-03-17 09:33:11 381

转载 C++ 虚函数表解析--陈皓

本文出自 “陈皓的个人专栏” 博客,请务必保留此出处http://haoel.blog.51cto.com/313033/124595前言C++关于虚函数的使用方法,我在这里不做过多的阐述。大家可以看看相关的C++当然,相同的文章在网上也出现过一些了,但我总感觉这些文章不是很容易阅读,大段大段的代码,没有图片,没有详细的说明,没有比较,没有举一反三。不利于学习和阅读,所以这是我想写下这

2015-03-17 09:19:22 417

原创 const关键字

1.const常量在定义的时候必须初始化;const对象默认的是文件的局部变量,只存在该文件内部,不能被其他文件访问。(使用extern 可以使整个程序访问const 对象);2.const和引用const引用是指向const对象的引用:const int ival =1024;const int &refval= ival; //okint &rev =ival

2015-03-11 10:19:29 298

空空如也

空空如也

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

TA关注的人

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