(etc.)
You might find that you need
#include <istream>
and/or
#include <ostream>
too.
//==============================================================================
Thanks you everybody
i am writting 2 programs in VC++ 6.0, one for XML files the header is
up i have no problem which them it is ok, and the second programm is a
dynamic table to memory some data typ is ok. but i want to put the
both pragrams together (2 classes in 1) and i don´t any code of
program and try to compile alone the xml.cpp file and i become this
errors.
Compiling...
xml.cpp
\config\xml.cpp(164) : error C2228: left of '.open' must have
class/struct/union type
config_xml_1\config\xml.cpp(167) : error C2228: left of '.eof' must
have class/struct/union type
config_xml_1\config\xml.cpp(167) : fatal error C1903: unable to
recover from previous error(s); stopping compilation
Generating Code...
Compiling...
Config.cpp
Generating Code...
Error executing cl.exe.
Config.exe - 3 error(s), 0 warning(s)
#===============================================================================
here are the errors line from the xml.cpp
the first ==> fileread.open(infile,ios::in);
the second ==> while(!fileread.eof())
#===============================================================================
here are the headers of the both programs.
#===============================================================================
#ifndef _XML_H
#define _XML_H
#include<fstream>
#include<string>
using namespace std;
class XML
{
private:
ifstream fileread;
ofstream filewrite;
public:
// For reading file and inserting the key and value pairs into
XML file
static void readfile(char *infile,string key1,string
text1,string str_value,string val);
// Function for converting the function parameters into XML file
static void writeXML(char *infile,string val,char *path);
// retrieving the value
string getValue(char *infile,char *path);
};
#endif // _XML_H
#===============================================================================
#ifndef _Config_h
#define _Config_h
#include <dynamictable.h>
#include <strings.h>
class Config {
private:
DynamicTable<String *> Values ;
String filename , path ;
public:
// StandardKonstruktor
Config();
// Konstruktor
Config (String , String);
// Desrtruktor
~Config();
// PutString -- Put a string value (true string) into the DynamicTable
char* PutString(String Key, String Value);
// void PutString(String Key, String Value);
// GetString -- Get a string value (true string) from the DynamicTable
String GetString (String Key);
// PutColor -- Put a color value into the DynamicTable
void PutInt(String key , int value);
// PutFloat -- Put a color value into the DynamicTable
void PutFloat (const char * Name, double Value);
// PutColor -- Put a color value into the DynamicTable
void PutColor (const char * Name, const COLORREF Value = 0);
// GetFloat -- Get a floating-point value from the DynamicTable
double GetFloat (String key);
// GetInt -- Get a Int value from the DynamicTable
int GetInt (String key);
// GetColor -- Get a color (COLORREF) value from the DynamicTable
COLORREF GetColor(String key);
// Save the value
void save ();
};
#endif // Config_h
#===============================================================================
THX
Armando