variable 'std:ofstream' has initializer but incomplete type
来源:互联网 发布:papi酱起诉 知乎 编辑:程序博客网 时间:2024/05/29 14:48
variable 'std:ofstream’ has initializer but incomplete type
或者是variable 'std:ifstream’ has initializer but incomplete type
其原因是因为没有包含fstream这个头文件。
- #include<fstream>
- #include<iostream>
- #include<string>
- using namespace std;
- int main()
- {
- fstream f("filename");
- f << 20;
- f.close();
- }
上面这段代码如果没有那个<fstream>就会有标题的错误。
- variable 'std:ofstream' has initializer but incomplete type
- variable 'std:ofstream' has initializer but incomplete type
- variable 'std:ofstream' has initializer but incomplete type 错误
- variable `xxx' has initializer but incomplete type
- variable `xxx' has initializer but incomplete type
- variable `xxx' has initializer but incomplete type
- variable "xxx" has initializer but incomplete type
- qt error: variable `QPainter painter' has initializer but incomplete type
- error: variable '__this_module' has initializer but incomplete type错误解决
- paip.variable xxx has initializer but incomplete type 解决方案
- Error: variable 'QApplication app' has initializer but incomplete type
- error: variable ‘QApplication a’ has initializer but incomplete type
- error: variable '__this_module' has initializer but incomplete type错误解决
- 关于错误: error: variable ‘QApplication app’ has initializer but incomplete type
- 解决 has incomplete type
- field has incomplete type
- c++ aggregate 'std::stringstream ss' has incomplete type and cannot be defined
- error: field ‘?’ has incomplete type
- c语言写了一个简单的正弦波函数
- 我觉得很对的话
- VS2008注释宏的制定
- Android横屏竖屏切换的问题
- 4--10
- variable 'std:ofstream' has initializer but incomplete type
- CGAL使用心得
- 编程算法之动态规划之最长公共子序列(java版)
- iostream.h和iostream 区别
- 嵌入式和就业(转)
- CGAL使用心得(附加说明)
- 深入浅出学习Struts1框架(七):ActionServlet实例化之读取struts-config.xml配置文件
- ubuntu 11.10 添加分辨率
- CGAL中2D Arrangements学习笔记