包括不起作用C 的文件
include file not working c++
我创建了一个标头文件,以将其他headerfiles作为捷径包含,并且几乎适用于我的所有文件,但是我对文件I/O文件有问题(IT引发错误的错误,内容不包括文件(。
包括文件(includ.h(
#ifndef INCLUDES_H_
#define INCLUDES_H_
#include <vector>
#include "html.h"
#include "file.h"
#include <string>
#include "test.h"
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <cstdlib>
#endif
file(file.h(
#ifndef FILE_H_
#define FILE_H_
#include "includes.h"
namespace file
{
int file()
{
std::string filename;
std::cout <<"What would you like to name your file?n";
std::cout << "(don't put in the .html)n";
std::cin >> filename;
filename = filename +".html";
std::ofstream outf(filename);
return 0;
}
}
#endif
您不应该在files.h
文件中加入files.h
。
制作大量的文件似乎是一个坏主意。无论是否实际需要,所有时间都在任何时候都包含在任何时候。这可能会导致难以诊断错误。
仅包括您需要的东西。
相关文章:
- SFML 加载从文件不起作用,奇怪的错误
- 为什么写入文件不起作用
- Opencv ml 头文件不起作用
- 将数组保存到二进制文件不起作用 c++
- C++输出流到文件不起作用
- 使用 bazel 构建 TensorFlow C++调用模型时,.so 文件不起作用
- C++接口(标头)和实现文件不起作用
- 二进制文件:ios ::二进制文件不起作用
- 解密AES-256加密文件不起作用
- MinGW .h 编译文件不起作用:此文件的版本与您运行的 Windows 版本不兼容
- 在 Linux 中使用 C++ 列出目录的所有文件不起作用
- 以二进制模式写入文件不起作用
- Android NDK 中的某些 c++ 包含文件不起作用
- 通过 Makefile 编译 2 个文件不起作用
- 标头和源类文件不起作用
- 线程清理器的抑制文件不起作用:出了什么问题
- 我的生成文件不起作用
- c++fileIO创建/打开文件不起作用
- C++ 使用文件不起作用初学者
- 在QtCreator中逐行读取文本文件不起作用