Posted By:
merom_klein
Posted On:
Monday, April 30, 2001 02:11 AM
i wrote my own main.cpp file in order to compile and link it with all my antlr project: #include #include "l.hpp" #include "p.hpp" void main () { using namespace std; basic_istream x(); L lexer(x); P parser(lexer); parser.startRule(); } however this code doesn't compile well: C:antlrantlr-2.7.1libcppsrcmain.cpp(13) : error C2664: '__thiscall L::L(class std::basic_istream > &)' : cannot convert parameter 1 from 'class std::basic_istream > (void)' to 'class std::basic_istream > &' Context does not allow for disambiguation of overloaded function
More>>
i wrote my own main.cpp file
in order to compile and link it with
all my antlr project:
#include
#include "l.hpp"
#include "p.hpp"
void main ()
{
using namespace std;
basic_istream
x();
L lexer(x);
P parser(lexer);
parser.startRule();
}
however this code doesn't compile well:
C:antlrantlr-2.7.1libcppsrcmain.cpp(13) : error C2664: '__thiscall L::L(class std::basic_istream
> &)' : cannot convert parameter 1 from 'class std::basic_istream
> (void)'
to 'class std::basic_istream
> &'
Context does not allow for disambiguation of overloaded function
what is wrong with this code?
how can it be fixed?
can you supply a diferent and mybe better example as you did with the main.java?
please, i need an answer urgently
i would appreciate it very much if you
answer.
sincerely
merom klein