自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 资源 (14)
  • 收藏
  • 关注

原创 C++良好的代码风格

1, 命名,简单就是美,简单易记,望文生义,并且风格要保持一致。 2, 注释 3, 合理的缩进和版面布局 4, 遵守基本的编程约定。 5, 功能分类的函数等分类好。

2010-05-07 17:17:00 805

原创 ACE调试信息的输出

/**00470 * Format a message to the thread-safe ACE logging mechanism. Valid00471 * options (prefixed by %, as in printf format strings) include:00472 * - A: p

2010-01-30 09:55:00 743

原创 几个关于文件路径方面的函数,不断更新...

PathStripToRoot      得到该路径的根目录 Removes all parts of the path except for the root information. SyntaxBOOL PathStripToRoot(          LPTSTR szRoot);ParametersszRoot[in,

2009-12-02 16:39:00 1110

原创 cin EOF Linux

 我为什么写这个题目呢,因为我今天要写的博与这三者都有关系,至少我个人认为是这样的。有个人问了一个这样的小程序,说有问题:#include #include #include using namespace std;int main(){ vector spvec; string str; cout <<"input string" <<endl;

2009-11-25 15:15:00 1284

转载 网络是否连接?

    IsNetworkAlive FunctionIsNetworkAlive Function The IsNetworkAlive function determines whether or not a local system is connected to a network, and identifies the type

2009-11-24 11:43:00 1051

转载 vim 中使用多个文件

 辛辛苦苦写了这么久,不小心按了一下什么,把firefox关了。所有东西不见了,再也不想写了,抄一个来吧。  其实自己查看帮助也行,在vim的命令模式下输入:                         help tabnew   下面的是抄的,与帮助里面说的差不多,我基本都试过了。 from: http://blog.csdn.net/timke212004/ar

2009-11-23 15:45:00 875

原创 几个关于语言和区域的函数

 GetUserDefaultUILanguageThis function retrieves the language identifier (LANGID) for the current users UI language selection.http://msdn.microsoft.com/en-us/library/aa913797.aspx   Set

2009-11-20 17:26:00 890

原创 阻止Windows注消 (log off or logging off)

 先看下MSDN http://msdn.microsoft.com/en-us/library/aa376876%28VS.85%29.aspx 示例代码: LRESULT CLangTestDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam){ if(message==WM_QUERYENDS

2009-11-13 16:35:00 2000

原创 SHBrowseForFolder 上的network不能展开???

 关于SHBrowseForFolder的使用麻烦翻看我前面所写的博文。 但后来我改了什么我倒不知道,只是那样在win7下NetWork是不能展开看到文件夹的,但是奇怪的是XP可以。我找了半天,后面发现别人的一个例子可以做到,我的不可以,但他的与我所写的基本一样,这样我就晕了,难道是我的设置错误吧。  找了一下,果然,我错误的代码是这样的:  BROWSEINFO bi;// ...

2009-11-09 16:19:00 828

翻译 CreateNamedPipe

 // Click Start Client to start the NamedPipe Clientvoid CDlgTestDlg::OnBnClickedOk(){ CString szPipeName; szPipeName.Format(_T("////%s//pipe//%s"),_T("."),_T("HelloWorld")); HANDLE hP

2009-11-09 13:59:00 6692

翻译 VC++ 创建管道

 void CDlgTestDlg::OnBnClickedOk(){ SECURITY_ATTRIBUTES sa; HANDLE hRead,hWrite; sa.nLength=sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle=TRUE; if(!CreatePipe(&hRead,&hWrite,&sa,0))

2009-11-05 16:49:00 1904

原创 SHGetSpecialFolderLocation 的使用方法

详情,请查看MSDN:http://msdn.microsoft.com/en-us/library/bb762203%28VS.85%29.aspx 这里只提供一小段代码: void CDlgTestDlg::OnBnClickedOk(){ LPITEMIDLIST pidl; TCHAR szPath [MAX_PATH]; if(SUCCEEDED( S

2009-10-29 17:39:00 4102

原创 SHBrowseForFolder的使用,获取其中一个button的ID

 关于其他方面的东西,可以参考上一篇:http://blog.csdn.net/HelloDan/archive/2009/10/26/4729693.aspx  HWND hChild=GetWindow(hwnd, GW_CHILD); while(hChild) { GetWindowText(hChild,szWindo

2009-10-29 15:44:00 903

原创 SHBrowseForFolder 的一些使用

   SHBrowseForFolder是一个可以用于获取文件夹路径的Windows API。使用起来可以方便很多,近来在写程序时用到了,现在总结一下。   首先当然要有一些基本认识才行。所以先看一下下面所列的MSDN。http://msdn.microsoft.com/en-us/library/bb762115%28VS.85%29.aspxhttp://msdn.micr

2009-10-26 16:07:00 5039 2

转载 VS2008 中无法使用ACTIVEX控件的解决

转]VS2008 中无法使用ACTIVEX控件的解决如果你在打开对话框时弹出 "The ActiveX control "Grid Control" could not be instantiated because it requires a design-time license"这个对话框时,在VC安装盘中找到vb6controls.reg,双击导入注册表就OK了,没有这个文件的

2009-10-08 01:03:00 2836

转载 CallBack function from Pointers on C

#includetypedef struct ode{ int value; struct Node *link;}Node;/*Call back function, its useful for different kind of node, we just want to change compare function*/Node* getnode(

2009-09-18 01:38:00 579

原创 写程序都会遇到的问题, DPI

http://msdn.microsoft.com/en-us/library/dd464659%28VS.85%29.aspx http://msdn.microsoft.com/en-us/library/dd464660%28VS.85%29.aspx 

2009-09-09 14:12:00 592

原创 C++相关的信息。。。

http://www.research.att.com/~bs/bs_faq2.html#vcall 里面有C++作者关于C++的一切信息。

2009-08-25 17:09:00 646

原创 C/C++ 头文件相对位置的包含

    对于多个的C/C++头文件的包含,一般情况下放在工程的目录下编译器就可以正确地找到。 但是对于在不同文件夹下的头文件的包含,当然可以写完整的路径,但是这样有可能会出现将工程拷到别人的机子上运行不了的问题。如果在这个程里同写上相对的路径,那么不仅在自己的机子上能运行,别人拷了过去也能正确运行。     例如我的一个工程头文件如下:      c:/F/Work/test/te

2009-08-24 11:27:00 6895 2

转载 Nested Dialogs 嵌套对话框

The Windows Common Dialogs<!-- <!-- function fullSize(sURL){window.open(sURL,scrshot,width=500,height=375,top=20,left=20,directories=no , Toolbar = no, resizable = yes, menubar = no, ScrollBa

2009-08-10 16:58:00 730

翻译 modeless dialog.

     First of all, I must announce that the main ideas of this paper are from Programming Microsoft Visual C++ Fifth Edition.  In order to demostrate the modeless dialog. Here I take the followi

2009-08-10 15:02:00 900

转载 transparent CStatic

// Method 1:class CTransparentStatic : public CStatic{ DECLARE_DYNAMIC(CTransparentStatic)public: CTransparentStatic(); virtual ~CTransparentStatic();protected: afx_msg LRESULT OnSet

2009-08-05 11:16:00 1565

转载 setjmp()/longjmp()

setjmp()/longjmp()Setjmp() and longjmp() are subroutines that let you perform complex flow-of-control in C/Unix. One of the keys to understanding setjmp() andlongjmp() is to under

2009-07-21 09:41:00 949

原创 ActiveX in Visual studio 2008

   近来看书看到了ActiveX,由于环境换成了Visual studio 2008,找了半天没有找到ActiveX Test container,到网上找了一下才发现ActiveX Test container in Visual studio 2008是要自己编译的,下面是MS所介绍的。 http://msdn.microsoft.com/en-us/library/f9adb5t5

2009-06-25 22:24:00 1385

原创 stdarg Macro 关于可变参数

 #includestdio.h>#includestdarg.h>double average(int val,...)...{  va_list var_arg;  int count;  double sum=0.0;  /** *//**prepare to visit variable arguments**/  va_start(var_arg,val);    /** *//

2008-03-04 01:48:00 770

原创 Iterator

    #include iterator> #include numeric> #include deque> #include iostream>  using std::deque; using std::cout; using std::ostream_iterator; using std::endl;  int main () ...{   //   // Initialize a

2008-01-06 03:50:00 132

原创 整理的C++ primer TextQuery 例题

/**///////   TextQuery.cpp/**//* * This file contains code from "C++ Primer, Fourth Edition", by Stanley B. * Lippman, Jose Lajoie, and Barbara E. Moo, and is covered under the * copyright and warra

2008-01-05 01:41:00 1399

原创 C++ primer English Fourth edition page 349 exercises

/**//* C++ primer English Fourth editionpage 349 exercise 9.40*/#includestring>#includeiostream>using namespace std;int main()...{  string q1("When lilacs last in the dooryard bloomd");  string q2(

2007-12-25 01:16:00 597

原创 C++ primer english fourth edition page330

#includeiostream> //#include#includelist>#includevector>using namespace std; int main() ...{    listchar*> clist(5,"Hello Dan");   vectorstring> svec(7,"HelloWord");   svec.assign(clist.begin(),clis

2007-12-22 02:29:00 774

原创 A Error in C++ primer English Fourth edition

#includeiostream> #includevector>using namespace std; int main() ...{    vectorint> vec(10,12);   for(vectorint>::iterator iter=vec.begin();iter!=vec.end();++iter)       coutiter"  ";   coutendl;   

2007-12-22 01:31:00 580

原创 C++ primer English Fourth edition P322 Exercise 9.18

 #includeiostream>#includevector>#includelist>#includealgorithm>using namespace std;/**//*// The procedure to compare a vector and a list is find if they are equal.bool compare(const vector &vec,c

2007-12-21 00:53:00 800

原创 using switch case block not just under the integral type

#includeiostream>   #includestring>   #includemap>using namespace std;int main() ...{      mapstring,int> strint;   strint.insert(make_pair("Banana",1));   strint["Apple"]=2;      strint.insert(maps

2007-12-17 00:56:00 759

原创 Assembly language experiment----Encryption

Title Encryption program;-----------------------------------------------------------;Discription: TO encrypt data from a file.;Author: Dan Lee, Sun Yat-sen University  All rights reserved;----------

2007-12-16 01:19:00 799

原创 Insert sort

#includeiostream>using namespace std;templatetypename type>void insert_sort(type *arr,long num)...{  long i(0),j(0);  type key;  for(j=1;jnum;++j)  ...{    key=*(arr+j);    i=j-1;    while(i>=0 && *

2007-12-16 00:35:00 739

原创 C++ primer English fourth edition exercise page 301

 C++ primer fourth edition page301Write a program to store each line from a file in a vector. Now use an istringstream to read each line from the vector a word at a time.#includeiostream>#in

2007-12-15 01:45:00 554

原创 C++的sstream标准库介绍

 From:http://www.cppblog.com/tommyyan/archive/2006/08/18/8023.html接下来我们继续看一下C++风格的串流控制,C++引入了ostringstream、istringstream、stringstream这三个类,要使用他们创建对象就必须包含sstream.h头文件。   istringstream类用于执行C++风格的串流

2007-12-12 14:19:00 1241

原创 好多东西不会

发现自己好多东西不会。现在又没时间学,晕啊~真后悔以前不努力,不早点遇到CSDN今天看到了论坛的人在讨论荷兰国旗问题,好想编一下,但又没时间。等过了一月吧。我专心学编程。还有今天收藏了一个关于缓冲区的帖,在输入输出方面我个人还有很多不懂,到时再看。这里是提醒自己。  

2007-12-08 01:30:00 1019 2

转载 c++ ios::app and ios::ate

 First lets assure, that I understand what you want to do: You want to open an existing file, append some data, then go back to the position where you started to append and write some other data at

2007-12-06 13:21:00 5499

FTP 多线程断点续传下载

一个在很多网上都有介绍的FTP断点续传下载程序,但是有得下载的很少。我找了很久才找到,放上面吧。

2010-08-12

FFFTP FTP下载

一个据说日本人写的FTP.据说很好用,到处找才找到了来下载。。。

2010-08-12

Programming Microsoft Visual C++ Fifth Edition 代码

David Kruglinski / Scot Wingo / George Shepherd

2009-06-30

Programming Microsoft Visual C++ Fifth Edition

Programming Microsoft Visual C++ Fifth Edition David Kruglinski / Scot Wingo / George Shepherd

2009-06-30

Programming windows with MFC的一个例子

Programming windows with MFC的一个例子,我改了一下,里面有问题,叫别人帮我改,放在上面好叫别人下载。其他人可以不下载了。谢谢!!!

2009-05-22

传递函数指针到DLL函数中去的示例

传递函数指针到DLL函数中去的示例。 里面有DLL 工程和测试程序。

2009-04-20

Thinning methodologies-a comprehensive survey

Thinning methodologies-a comprehensive survey.pdf

2009-04-16

Deformation Models for Image Recognition

Deformation Models for Image Recognition Deformation Models for Image Recognition

2009-04-16

Qt文件操作示例程序

Qt写的文件操作示例程序。在文件操作时会显示一个进度条。其实是没有什么新意的。不过如果你想学习。可以看一下。

2009-04-04

Qt写的遗传算法加画图程序

Qt写的遗传算法加画图程序。借用了书上少部分代码。加入了遗传算法的部分,能设置代数,概率等,能根据代数的进化来不停地画图。。。即可提供一代画图,也可以一次性,设置的全部分代数画图。

2009-04-04

C语言解决螺旋数组问题

螺旋数组问题,相信很多人都做过了,初学者可以看一下,应该会有用处的。

2009-03-17

约瑟夫(Joeph)问题CC++解法

约瑟夫(Joeph)问题CC++解法 其实没有什么好说的啊。就是一个C/C++代码,非常简单的,只是我下载了东西,也想上传一些,不知上传什么好才这样的。

2009-03-17

维吉尼亚密码的简单实现

C/C++编写,并非GUI版

2007-07-23

简单遗传算法C语言代码

由 Denis Cormier(North Carolina State University)开发的,Sita Raghavan(University of North Carolina at Charlotte)修正的遗传算法C代码。

2007-05-29

空空如也

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

TA关注的人

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