.h
#include <windows.h>
#include <nb30.h>
int Recv(int lana, int lsn, char *buffer, DWORD *len);
int Send(int lana, int lsn, char *data, DWORD len);
int AddName(int lan……继续阅读 »
9年前 (2016-04-27) 1500浏览
0个赞
代码如下
class Student
{
string name;
public:
Student(string n = "1234")
{
cout << "Construing student " + n + "\n";
name = n;
}
};
int _tmain(int argc, _TCHAR* argv[])
……继续阅读 »
9年前 (2016-04-27) 1158浏览
0个赞
今天小弟看c++ premier时候,看到swap两个同类型的顺序容器,迭代器不会失效。
回来验证了下,发现果然如书上所说,但是验证过程中发现另一个问题。
代码如下:
#include <iostream>
#include<vector>
using namespace std;
using std::vector;
int mai……继续阅读 »
9年前 (2016-04-27) 2520浏览
0个赞
#include “stdafx.h”
#include <string>
#include <iostream>
#include <WinSock2.h>
#include <Windows.h>
#pragma comment(lib, “ws2_32.lib̶……继续阅读 »
9年前 (2016-04-27) 1350浏览
0个赞
在C++中,数字表达提供了一系列的后缀进行表示,如下:
u或U 表示数字是无符号整型数,如:123u,但并不说明是长整型还是短整型
l或L 表示数字是长整型数,如:123l;而123ul就是无符号长整型数;而34.4l就是长双精度浮点数,等效于双精度浮点数
i64或I64 表示数字是长长整型数,其是为64位操作系统定义的,长度比长整型数长。如:43i6……继续阅读 »
9年前 (2016-04-27) 2114浏览
0个赞
#include<iostream>
using namespace std;
double power(double x,int n);
int main()
{
int value=0;
cout<<“Enter an 8 bit binary number:”;
for(int i=7;i>=0;i……继续阅读 »
9年前 (2016-04-27) 1353浏览
0个赞
本人尝试在VS2015社区版中写一个包装指针的类,然而。
class data_t{
data_t(const wstr_t& str):m_data( (void*) (new wstr_t (str) ) ){}
inline operator wstr_t& const() { return *(wstr_t*)(m_data); }
……继续阅读 »
9年前 (2016-04-27) 1420浏览
0个赞
在博客里找到了一个C++遍历文件夹的代码,有一段是这个
vector<string>file_vec = statdir.BeginBrowseFilenames(“*.*”);
for (vector<string>::const_iterator it = file_vec.begin(); it <……继续阅读 »
9年前 (2016-04-27) 1185浏览
0个赞
VS2010 没有鼠标悬停提示
解决方案
……继续阅读 »
9年前 (2016-04-27) 965浏览
0个赞