自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Exchange Nodes

Problem: Exchange the odd and even nodes in a linked list.Given a "head" pointer to a linked list. You are asked to write a C/C++ function to exchange the odd and even nodes in the linked list. For ex

2005-10-22 08:50:00 759

原创 Partially Revert Linked List

Problem: partially revert a linked listGiven a HEAD pointer to a linked list and an OFFSET pointer pointing to a node in the linked list. You are asked to write a C/C++ subroutine to revert the part o

2005-10-22 08:48:00 754

原创 Find Common Ancestor

Problem: find the common ancestor of two nodes in a treeGiven a "tree" pointer pointing to the root node of a tree and the other two pointers to two nodes in the tree. You are expected to write a C++

2005-10-22 08:46:00 835

原创 重温C++之虚拟析构函数

虚拟函数的引入是为了实现多态性(polymorphism),而虚拟析构函数是怎么实现多态性的?我想通过以下例子进行说明。#include using namespace std;class employee{public: employee(){  cout  } ~employee(){  cout  }};class programmer: public employee{public: pr

2005-10-22 08:35:00 892

原创 Boost库在XP+Visual C++.net中的安装

本人的机子是window xp系统,并安装了Visual Studio Dot Net2003中文版(个人还是偏好英文版,不过没下到). 其中Visual Studio Dot Net2003中文版的安装路径是D:/Program Files/Microsoft Visual Studio .NET 2003我的安装过程是:1.从www.boost.org中下载了boost_1_32_0.zip,

2005-05-19 08:22:00 1176

原创 重载标题栏中的最小化、最大化

这个功能一般很少用,但网上经常有人问起。其方法较简单,主要是通过重载OnSysCommand函数实现。消息WM_SYSCOMMAND映射到OnSysCommand函数。重载最小化示例如下:OnSysCommand(UINT nID, LPARAM lParam){          if ( nID == SC_MINIMIZE )         {             //insert y

2005-04-20 15:55:00 821

原创 屏蔽Dialog对话框中的Esc和Enter键的思路

       在MFC所生成的对话框程序中,默认的按下Esc键会导致程序退出,而按下Enter会使程序查找对话框的焦点落在哪个按扭上,从而执行该按钮的按下操作。        为了屏蔽这两个键可以通过重载PreTranslaMessag函数。具体如下:BOOL CMCIsingDlg::PreTranslateMessage(MSG* pMsg){  if( pMsg->message == WM

2005-04-20 08:56:00 1522 1

空空如也

空空如也

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

TA关注的人

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