A
Agos
I'm trying to learn VC++.NET. I used till now Borland C++ Builder 6.
I had a program starting like this:
#include <fstream.h>
#define TEMP_FILES 200
......
.......
fstream chunk_file[TEMP_FILES];
With Borland and g++ I had no problems with these lines instead VC++.NET
tells me that can't find #include <fstream.h>
I saw that it works with
#include <fstream> (without .h)
but if I use the header files this way I get an error in this declaration:
fstream chunk_file[TEMP_FILES];
So if I try to build this short program:
=========================================
#include "stdafx.h"
#include <fstream>
#define TEMP_FILES 200
int _tmain(int argc, _TCHAR* argv[])
{
fstream chunk_file[TEMP_FILES];
return 0;
}
=====================================================
VC++ gives me these errors:
error C2065: 'fstream' : undeclared identifier
(in fatc it knows what fstream is: A type basic_fstream specialized on char
template parameters.)
error C2146: syntax error : missing ';' before identifier 'chunk_file'
error C2065: 'chunk_file' : undeclared identifier
Where am I wrong and why these lines wokrks with Borland and g++?
Thank you very much
Agos
I had a program starting like this:
#include <fstream.h>
#define TEMP_FILES 200
......
.......
fstream chunk_file[TEMP_FILES];
With Borland and g++ I had no problems with these lines instead VC++.NET
tells me that can't find #include <fstream.h>
I saw that it works with
#include <fstream> (without .h)
but if I use the header files this way I get an error in this declaration:
fstream chunk_file[TEMP_FILES];
So if I try to build this short program:
=========================================
#include "stdafx.h"
#include <fstream>
#define TEMP_FILES 200
int _tmain(int argc, _TCHAR* argv[])
{
fstream chunk_file[TEMP_FILES];
return 0;
}
=====================================================
VC++ gives me these errors:
error C2065: 'fstream' : undeclared identifier
(in fatc it knows what fstream is: A type basic_fstream specialized on char
template parameters.)
error C2146: syntax error : missing ';' before identifier 'chunk_file'
error C2065: 'chunk_file' : undeclared identifier
Where am I wrong and why these lines wokrks with Borland and g++?
Thank you very much
Agos