- 博客(4)
- 收藏
- 关注
转载 C++中数字与字符串之间的转换
C++中数字与字符串之间的转换1、字符串数字之间的转换(1)string --> char * string str("OK"); char * p = str.c_str();(2)char * -->string char *p = "OK"; string str(p);(3)char * -->CString c
2015-08-08 20:48:25 171
原创 C++下实现形成文本的一种方法
将FLOAT型转换成字符型:FLOAT angle=100;char sendBuf[50];sprintf(sendBuf,"%s",angle);形成文本方法:#include "fstream"using namespace std;ofstream file("anglefile.txt");file file.close();
2015-08-08 20:29:26 194
转载 编写socket通信服务器端程序时的错误解决方法
在编写socket通信服务器端程序时出现error LNK2019: 无法解析的外部符号 __imp__closesocket@4这种错误。解决方法是:#pragma comment(lib,"ws2_32.lib")也就是在是编写的.cpp或者是.h文件的引用后添加上面那行就行了。这句话的前面意思是静态加入一个lib文件,也就是库文件ws2_32.lib文件,提供了对
2015-08-08 20:10:34 297
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人