重拾C++的编程之路:先来一个helloworld#include<iostream>
#include<Windows.h>
#include<tchar.h>
usingnamespacestd;
intmain(){
MessageBox(NULL,"Helloworld","Information",0);
return0;
}若弹出提示无XXX.exe文件,打开工具,XXX项目设置字符集编码为..
分类:
编程语言 时间:
2014-08-05 11:29:40
阅读次数:
218
在windows编程中,由于编码方式的不同和c与c++的不同而造成了许多复杂的有关字符串之间的转换首先,windows编码方式有ANSCLL和UNICODE,前者是单字符的,后者是双字符的。然后,char*理所当然是单字符的,string也是单字符的,而CString是Tchar的。那么什么是TCH...
分类:
编程语言 时间:
2014-08-05 10:44:39
阅读次数:
259
标准输入输出printf类_tprintf :类同printf_tprintf_l :类同printf, 但是"_l"表示第二个参数是一个locale.locale是操作系统对语言设定的参数, 这个会影响ANSI字符的语言识别, 在Unicode下应该是无差别的_tprintf_s :类图print...
分类:
其他好文 时间:
2014-08-04 17:20:07
阅读次数:
228
之前在VC++6.0上面写了下面这样的代码:int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]){ int nRetCode = 0; //不重要的部分略过if (argc>1) {if (strcmp(argv[1],"cre...
分类:
编程语言 时间:
2014-08-04 13:38:57
阅读次数:
224
int_tmain(intargc,_TCHAR*argv[])19{20libvlc_instance_t*inst;21libvlc_media_player_t*mp;22libvlc_media_t*m;23libvlc_log_t*log;2425/*LoadtheVLCengine*/26inst=libvlc_new(0,NULL);2728//logging29log=libvlc_log_open(inst);30libvlc_set_log_verbosity(inst,2);31unsi..
分类:
其他好文 时间:
2014-08-03 08:04:45
阅读次数:
1552
一、多用有序数组+折半查找金山卫士开源后立马招来各种批判,其中有一段批评金山卫士源码说太多if else而不用表驱动使得代码可读性不高,笔者看了下大致如下:TCHAR szFolderPath[MAX_PATH + 1] = {0}; // MichaelPeng: if else太多,应做成表驱....
分类:
其他好文 时间:
2014-08-02 12:21:53
阅读次数:
234
通过大话设计模式一书学习后,c++编写的设计模式代码:
// OOTest.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "Operation.h"
#include "OperationFactory.h"
int _tmain(int argc, _TCHAR* argv[])
{
double resurt=0;
Op...
分类:
其他好文 时间:
2014-08-01 19:55:32
阅读次数:
221
//重新整理的比较清楚的opencv框架#include "stdafx.h"#include #include #include using namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){ Mat las...
分类:
其他好文 时间:
2014-07-31 23:29:50
阅读次数:
343
vs2008 调试报错#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){ FILE *fp,*ofp; void filecopy(FILE *,FILE *); if(argc == 1) filecopy(stdin,stdout)....
分类:
其他好文 时间:
2014-07-30 00:51:52
阅读次数:
228
1 BOOL CreateFileDemo(TCHAR* pFileName, DWORD dwSize) 2 { 3 HANDLE hFile; 4 HANDLE hMapFile; 5 6 hFile = CreateFile( 7 pFileName...
分类:
其他好文 时间:
2014-07-29 21:09:42
阅读次数:
212