c++.net程序设计,一个问题
1. 1>.\player.cpp(4) : error C2533: “player::{ctor}”: 构造函数不能有返回类型2. 1>.\player.cpp(18) : error C2088: “<<”: 对于 class 非法
3. 1>.\player.cpp(22) : error C2088: “<<”: 对于 class 非法
4. 1>.\player.cpp(26) : error C2088: “<<”: 对于 class 非法
这是什么情况?
对应的代码行:
1. player::player(){} 函数声明:player(); //奇怪啊,我明明没有设返回值啊
2. cout << player::_name << ":" << player::_words << endl; //这又怎么错啦?
player.h: #pragma once
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
麻烦大家帮帮我,我是信后,不懂啊 --------------------编程问答-------------------- 把这个函数player()帖出来看看
出错的代码也贴出来
补充:.NET技术 , VC.NET