Hi all ,
I was trying to run one distribution, but came across some compilation problem. I'm using fedora core 2, and g++ (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7) compiler. When tried to "make" the exe files, the followwing error msg was seen. Plz suggest what I should do for the program to call the floor() function defined in math.h ? I tried adding including math.h, but it did not work. I am getting the same error again. Typecasting the arguements to double in the CPP program also did not work. Please give ur suggestions. I'm attaching the archived programs also.
/*
* This is the error mesage obtained from console
*
g++ -O3 -c RBFCFTree.cpp
RBFCFTree.cpp: In member function `void
RBFCFTree::extensionExplore(std::vector<long int, std::allocator<long int>
>&, std:
stream&, const std::vector<RFreeTree*, std::allocator<RFreeTree*>
>&, const std::vector<Occurrence, std::allocator<Occurrence> >&, const
std::vector<std::vector<short int, std::allocator<short int> >,
std::allocator<std::vector<short int, std::allocator<short int> > > >&,
const std::vector<long int, std::allocator<long int> >&, const long int&)':
RBFCFTree.cpp:685: error: call of overloaded `floor(long int)' is ambiguous
/usr/include/bits/mathinline.h:499: error: candidates are: double floor(double)
/usr/include/c++/3.3.3/cmath:342: error: long double
std::floor(long double)
/usr/include/c++/3.3.3/cmath:334: error: float
std::floor(float)
make: *** [RBFCFTree.o] Error 1
*
*
*/
Regards
Ssk
( Can i attach the codes ? I cud not find option to attach .. )