OutputDebugString下遇见了LPCSTR与char *str之间的关系
2014-04-21 00:01
471 查看
CCC.h
DDD.h
应用以上代码
LPCSTR 、 const char * 、怎么输出字符串到缓冲区 、printf(char*,const char* ......)
所有的事实都在说明const char * 能干的事情一目了然
#pragma once #include <windows.h> typedef LPCSTR XXX; class CCC { public: void OPSID(XXX lpstr1,XXX lpstr2) { OutputDebugString(lpstr1); OutputDebugString(lpstr2); } protected: private: };
DDD.h
#pragma once #include <windows.h> typedef const char *xLPCSTR,*xPCSTR; class DDD { public: void OPSID(xLPCSTR lpstr1,xLPCSTR lpstr2) { OutputDebugString(lpstr1); OutputDebugString(lpstr2); } protected: private: };
应用以上代码
char strArray[256]="12313"; CCC *pccc; pccc=new CCC(); pccc->OPSID("",strArray); DDD ddd; ddd.OPSID(strArray,strArray);
LPCSTR 、 const char * 、怎么输出字符串到缓冲区 、printf(char*,const char* ......)
所有的事实都在说明const char * 能干的事情一目了然
相关文章推荐
- char * str中的str(%s),*str,str(地址),&str,&str[0]之间的不同关系
- nstring nsdata byte char 之间关系
- void OutputDebugStringf(char *fmt, ...)
- 转:char*, char[] ,CString, string之间的关系和一些常用函数
- const char *,char * ,string,char []之间的关系和转换
- java中String Date Timestamp Calendar 之间的关系及转换
- Cstring,string,char*,char[]之间的转换
- string,wstring,CString,TCHAR,char*之间常用转换
- 在程序中访问OutputDebugString的信息
- VC中CString,int,string,char*之间的转换
- OutputDebugString的用法
- 使用OutputDebugString帮助调试
- string,CString,char*之间的转化
- java中String Date Timestamp Calendar 之间的关系及转换
- string 与char* char[]之间的转换
- CString const char*与char*之间的转换关系
- 转载: 译:理解 Win32 "OutputDebugString"
- OutputDebugString的BUG
- C#中char[]与string之间的转换
- char | string | NSString 之间的转换