社区
C++ 语言
帖子详情
CString函数的库问题
hb2005
2005-04-24 05:44:02
CString是那个库函数下面的函数,我用了
#include "stdafx.h"
int main(int argc, char* argv[])
{
//strMsg = new CString("1234567890", 20);
CString newwww;
printf("Hello World!\n");
return 0;
}
这样提示undeclared identifier
...全文
130
9
打赏
收藏
CString函数的库问题
CString是那个库函数下面的函数,我用了 #include "stdafx.h" int main(int argc, char* argv[]) { //strMsg = new CString("1234567890", 20); CString newwww; printf("Hello World!\n"); return 0; } 这样提示undeclared identifier
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zhongwei5695
2005-04-24
打赏
举报
回复
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string newwwwww;
printf("Hello World!\n");
return 0;
}
ysbcg
2005-04-24
打赏
举报
回复
#include <string>
using namespace std;
useresu
2005-04-24
打赏
举报
回复
#include "stdafx.h"
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
string newwww;
printf("Hello World!\n");
return 0;
}
chunhai12
2005-04-24
打赏
举报
回复
#include <string>
using namespace std;
int main(
{
string str;
return 0;
}
hb2005
2005-04-24
打赏
举报
回复
还是那样的提示
hb2005
2005-04-24
打赏
举报
回复
#include "stdafx.h"
#include <string.h>
int main(int argc, char* argv[])
{
string newwww;
printf("Hello World!\n");
return 0;
}
这样还是不行
useresu
2005-04-24
打赏
举报
回复
而且string是stl的东西,
stl是标准库的一部分,
标准的东西自然推荐使用了,
可移置性好,而且string的实现也健壮很多.
当然如果你用大部分用到mfc的程序,还是用CString,
因为太多的函数参数是传CString的,虽然有传char * 的,
但是与string还是得转换.不如直接用CString
chunhai12
2005-04-24
打赏
举报
回复
CString是MFC类库中的字符串
在afx.h中
win32 console mode下就用string
useresu
2005-04-24
打赏
举报
回复
CString 是mfc类库的东西,
如果你不是选择的mfc工程,他是不能用的.
你可以用std::string代替
只要头文件#include <string>
就可以了
C++里面的C
String
库
函数
里面的各种
函数
用法
C++里面的C
String
库
函数
里面的各种
函数
用法,对参加ACM竞赛的童鞋们很实用。在比赛场上有一份这样的文档更是方便
最全的C
String
类成员
函数
的说明
中文英文相结合,全面地对C
String
类成员
函数
进行说明,有实例和目录。
zip dll and code
该动态
库
中包含了压缩和解压缩的实现,用vs2010打开工程可以直接运行,封装了六个
函数
,能实现代码操作对文件(夹)的压缩和解压缩:
函数
: BOOL WINAPI ZipPackDir(C
String
& pFilePath, C
String
& ...
VC++(VS2010)读写Excel文件代码(附示例)
2)指定操作sheet,使用Excel_example.SetSheet(2)
函数
; 3)打开文件时最左侧的sheet序号为1,新建excel时最新添加的sheet序号为1. 【后记】 本程序主要基于网络CSDN中---“Excel封装
库
V2.0”---完成,下载地址...
c
string
库
常用
函数
本文介绍了c
string
库
的一些常用的
函数
,包括
函数
原型、用法、示例及注意事项等。
C++ 语言
64,654
社区成员
250,484
社区内容
发帖
与我相关
我的任务
C++ 语言
C++ 语言相关问题讨论,技术干货分享,前沿动态等
复制链接
扫一扫
分享
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
请不要发布与C++技术无关的贴子
请不要发布与技术无关的招聘、广告的帖子
请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下
试试用AI创作助手写篇文章吧
+ 用AI写文章