报这个错~~ 好像 定义单个fstream 也报错。 1>------ 已启动生成: 项目: http_source, 配置: Debug Win32 ------ 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(346,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory. 1> main.cpp 1>c:\workplace\csource\http_source\http_source\http.h(50): error C2248: “std::basic_fstream<_Elem,_Traits>::basic_fstream”: 无法访问 private 成员(在“std::basic_fstream<_Elem,_Traits>”类中声明) 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\fstream(1246) : 参见“std::basic_fstream<_Elem,_Traits>::basic_fstream”的声明 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> 此诊断出现在编译器生成的函数“http::http(const http &)”中
#include<fstream> #include<iostream> using namespace std; void main() { fstream oufile[100] ; }
64,654
社区成员
250,484
社区内容
加载中
试试用AI创作助手写篇文章吧