我一直在这里关于ifstream的问题,所以我仍然无法阅读简单的文本文件。我与Visual Studio 2008年的工作 这里是我的代码: // CPPFileIO.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <fstream>
#include <
当出现单词“同义词”时,我想停止阅读我的文本输入文件。我正在使用ifstream,我不知道如何打破循环。我尝试使用stringstream“同义词”,但它结束了我的bst。如果您想避免打字,我会在下面列出完整的项目文件。 重要组成部分: for(;;) /*here, I wanna break the cycle when it reads "synonyms"*/
{
在VS 2005,我有一些代码,看起来像这样: ifs.open("foo");
while (!ifs.eof())
{
ifs.read(&bar,sizeof(bar));
loc = ifs.tellg();
loc += bar.dwHeaderSize;
// four byte boundary padding
if ((loc