double a = -60 ; double b = -7500 bool flag; if (a < b) { flag = true; } For the above check flag is getting true, it is not supposed to, how can I make the double negative comparison?
kamal1977
Posts
-
double signed comparison in C++ -
how to access member functions and variables in another project without .libThank you Daniel for the thoughts.. I am exploring other option due to the order I build the .lib gives linker error...if other option does not pan out I will go with your suggestion.. This was helpful..!
-
how to access member functions and variables in another project without .libThank you Richard !.. The order I am compiling the different projects(.lib) cannot be changed. First project referencing member functions from other project that was not even compiled..so other than getprocaddress() , no better option ?
-
how to access member functions and variables in another project without .libHi All , I have the below declaration in say abc.h and implementation of the member function in abc.cpp in Project A. How can I call/access some of this member functions in project B and Project C without including the A.lib in Project B and Project C? As is I am getting linker error from project B and C class __declspec(dllimport) B { public: B(); static B* Ptr1(); static int fn1(D* ptr2); D * fn2(); private: static int Result; static map map1; }; class __declspec(dllimport) C { public: C(); static C* Ptr1(); static int Fn4(const string& str1); static int Fn6(const string &str3, B* ptr4); static B* Fn7(string &str4); static bool isBoolEnabled() { return Boolean;} static void SetBoolean(bool bArg) {Boolean = bArg; } private: static map map3 ; static map map4; static bool Boolean; }; class __declspec(dllimport) D { vector Token1; vector Token2; vector Token3; }
-
error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal:) :)
-
error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegalstd::map <iCString,unsigned int> mCounters; //This function populate the "mCounters" map GetCounters(mCounters); map< iCString,unsigned int>::iterator it; for (map<iCString,unsigned int>::iterator it = mCounters.begin(); it = mCounters.end(); ++it) { } I am getting the error mentioned in the subject... what is the mistake I am doing :-( ? Fulll Error message ------------------ error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal 1> with 1> [ 1> _Mytree=std::_Tree_val,std::allocator>,false>> 1> ] 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called