ambiguous fstream
This is driving my crazy, i cannot seem to compile a fstream correctly, i have no idea what iam doing wrong, so can someone please, please help
Thanks
The problem is that no matter what i do, either fstream or ifstream comes up ans an ambiguous symbal or, ios::nocreate is not recognised
anyone got any ideas!!
I think the problem is either in my header arrangement, or the code line!!
so here both:
in StdAfx.h
#define WIN32_LEAN_AND_MEAN
#define DIRECTINPUT_VERSION 0x0300
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "glaux.lib")
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "dinput.lib")
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
typedef unsigned char byte;
typedef unsigned short word;
#include "Vector3D.h"
#include "Vector2D.h"
in the cpp file it is needed in
fstream file(sFileName.c_str(), ios::in || ios::nocreate);
if someone spots anything id appreciate it!!
Cheers
Paul.
I have done that, it fixed the ambiguous symbol problem but now i cannot use the ios::nocreate flag, which i need as iam not tring to create new files!!
Any ideas
Any ideas
ios::nocreate does not exist in the standard library and you don't need it.
Edited by - spock on October 25, 2001 8:42:53 AM
Edited by - spock on October 25, 2001 8:42:53 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement