@hanst99
Even in VC++ I include the fstream line.
I think that one of my #includes is specialy used for VC++ and I need an other one for normal ACII compiling.
my includes:
1 2 3 4 5 6 7
|
#include <iostream>
#include <string>
#include <string.h>
#include <cstring>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
|
When I enter the line: #include <fstream>
The number of total errors increases, saying:
C:\Users\...\Main.cpp||In member function 'int ReadFile::UitlezenBestand(int, char**)':|
C:\Users\...\Main.cpp|84|error: no matching function for call to 'std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::string&)'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\fstream|454|note: candidates are: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits<char>]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\fstream|440|note: std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT = char, _Traits = std::char_traits<char>]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\iosfwd|81|note: std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(const std::basic_ifstream<char, std::char_traits<char> >&)|
||=== Build finished: 1 errors, 0 warnings ===|
when I comment the #include <fstream> I get this error:
C:\Users\...\Main.cpp||In member function 'int ReadFile::UitlezenBestand(int, char**)':|
C:\Users\...\Main.cpp|84|error: variable 'std::ifstream inFile' has initializer but incomplete type|
||=== Build finished: 1 errors, 0 warnings ===|
Any idea? somebody?