码迷,mamicode.com
首页 >  
搜索关键字:tchar    ( 2435个结果
作业调度
#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){ #include"stdio.h" #include"stdlib.h" typedef struct PCB { char name[10]; char state; in...
分类:其他好文   时间:2015-05-07 10:20:08    阅读次数:164
疯狂C++01
extern的用法。#include"stdafx.h"#include<windows.h>externinta;//没有分配空间,申明不是定义intb;//全局变量,默认初始化为0int_tmain(intargc,_TCHAR*argv[]){printf("&d\n",a);//没有存储空间,没有意思,报错printf("%d\n",b);//输出0inta=10;//定义啊,并申..
分类:编程语言   时间:2015-05-06 15:25:01    阅读次数:130
C++泛型指针的正向与逆向循环读取的改进方法
#include"stdafx.h"#include#include#include#includeusingnamespacestd;int_tmain(intargc,_TCHAR*argv[]){//双向访问的例子charst[11]="abcdefghij";vectora(st,st+10...
分类:编程语言   时间:2015-05-06 12:50:58    阅读次数:263
Windows 编程中的字符串(2)
(1)windows写日志系统 1 void writeDebugEventLog(TCHAR* pszMessage, WORD wType) 2 { 3 //#ifdef _DEBUG 4 5 HANDLE hEventSource = NULL; 6 const TC...
分类:Windows程序   时间:2015-05-04 19:29:59    阅读次数:177
推荐的字符和字符串处理方法
最好将应用程序转换为支持Unicode的形式。 遵循的基本准则如下:1.开始将文本字符串想象为字符的数组,而不是char或字节的数组2.用通用数据类型(如TCHAR/PTSTR)来表示文本字符和字符串3.用明确的数据类型(如BYTE和PBYTE)来表示字节,字节指针和数据缓冲区4.用TEXT或_T宏...
分类:其他好文   时间:2015-04-29 00:37:21    阅读次数:209
openvc中读取图像访问图像中像元的的方法
一、读取图像1、利用Mat数据结构读取和显示图片#include"cv.h"#include "highgui.h"#includeusing namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){ Mat i.....
分类:其他好文   时间:2015-04-26 15:06:59    阅读次数:207
《大话数据结构》读书笔记——8.4.1折半查找
//c实现 1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 5 int _tmain(int argc, _TCHAR* argv[]) 6 { 7 int a[10] = {0,1,3,4,6,7,9,11,12,15}; 8 ...
分类:其他好文   时间:2015-04-22 21:57:24    阅读次数:117
数组名与数组首地址
int _tmain(int argc, _TCHAR* argv[]) { char i[10] = { 0 }; printf("%d %d\n",i,sizeof(i)); printf("%d %d\n",&i,sizeof(&i)); printf("%d %d",&i[0],sizeof...
分类:编程语言   时间:2015-04-17 10:57:30    阅读次数:202
C++中的goto陷阱
尽管程序设计中不提倡使用goto语句,但是有的时候为了简化代码,难免会使用到goto。下面我要讨论的这个陷阱C语言程序中不会遇到,反而C++中稍不注意就会引起问题。 直接看以下代码: int _tmain(int argc, _TCHAR* argv[]) { int t1 = 1; if (t1 >0) { goto __next; } int t2 = 5;...
分类:编程语言   时间:2015-04-16 17:37:46    阅读次数:266
strtok函数读写冲突问题
先上测试代码#include "stdafx.h"#include using namespace std;int _tmain(int argc, _TCHAR* argv[]){ const char* split = ";"; char* str = "Hello;world;";...
分类:其他好文   时间:2015-04-16 17:15:06    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!