// teststrcat.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <string>……继续阅读 »
10年前 (2015-05-11) 1352浏览 0评论
0个赞
C++
类模板
在类模板外部定义成员函数的方法为:
template<模板形参列表>
返回类型 类名<模板形参名>::函数名(参数列表)
{
函数体;
}
请教为什么这里面类成员函数out前要加<type>?template<class type>不已经指明了类型了吗?
不然……继续阅读 »
10年前 (2015-05-11) 1979浏览 0评论
0个赞
链表节点定义为:
struct Node{
int data;
struct Node *next;
}
编程实现:输入一个正整数 repeat (0<repeat<10),做 repeat 次下列运算:
输入若干个正整数(输入-1为结束标志),建立一个单向链表,将其中的奇数值结点删除后输出。
输入输出示例:括号内为说明
输入:
2……继续阅读 »
10年前 (2015-05-11) 1941浏览 0评论
0个赞
vs2012
内存
C/C++堆
为什么我在VS2012中new了如此大的空间却不会报错?char* p=new char[1024*1024*1024*1024*1024];我的物理内存为4G!
18分
因为 1024*1024*1024*1024*1024 == 0
18分
1024*1024*1024*1024*10……继续阅读 »
10年前 (2015-05-11) 1729浏览 0评论
0个赞
我有第四版 也有英文版第五版 但是想要第五版中文版看看 找了好久都没找到啊 求大神帮忙啊 !
我的邮箱:guangxuanliu@gmail.com
20分
第五版中文版才刚刚发布,别指望中文版的pdf了。这里是官方发布的试读版,你看看。
我知道是才发布的
5分
这么早,没有的!安心读读第四本版,应该多了c+……继续阅读 »
10年前 (2015-05-11) 5998浏览 0评论
0个赞
算法导论
这个代码为什么结果一直不对,会出来0
[code=c#include<iostream>
#include<stdlib.h>
#include<time.h>
using namespace std;
void Swap(int &a, int &b)//交换两个数的函数
{
a+=……继续阅读 »
10年前 (2015-05-11) 1979浏览 0评论
0个赞
CANopen报文例示:601 23 40 60 00 2f 45 00 01(十六进制)(格式不会变)
我定义了一个CString str1与IDC_EDIT1关联,在编辑框中输入以上报文,报文赋给str1.
同时定义了VCI_CAN_OBJ结构体:
typedef struct{
UINT32 time_stamp; ……继续阅读 »
10年前 (2015-05-11) 1603浏览 0评论
0个赞
我想实现将一个xml文件中某个元素转为字符串的功能,因为使用的是tinyxml2,所以写了如下代码
XMLDocument xmlDoc;
const char* data = "<Items><Item><Column>123</Column><Column>12</Col……继续阅读 »
10年前 (2015-05-11) 1791浏览 0评论
0个赞
c++
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
class CStudent
{
public:
string m_name;
double m_score[3];
double m_aver;……继续阅读 »
10年前 (2015-05-11) 1622浏览 0评论
0个赞