Description:
The object-oriented C++ language.
|
|
|
A Qustion about iostream
|
| |
Yesterday, my friend ask me a question about iostream.I know the result ,but can't explain.The program is below: ------------------------------ ------------------------------ ------------------------------ ------------------------------ --------------------------- ...using namespace std; int fun( int x )... more »
|
|
Function functors?
|
| |
I have a function that computes the distance between some objects. The distance could be euclidian, manhaten etc. I would therefore like to implement the distance metric as a functor as seen below: template<typename dist> function compute_distance(double a, double b) { dist dist_measure; double distance = dist_measure(a,b);... more »
|
|
hash_map vs unordered_map
|
| |
Hi, I am wondering if there are any functional differences between SGI's hash_map and tr1's unordered_map. Can these two containers be interchanged? What would it take to switch from hash_map to unordered_map? Thank you. -Marek
|
|
How to convert exe file of cgi script into .cgi extension.
|
| |
Hi. i learn about cgi scripting in c++ from deitel & deitel. in this book he uses .cgi extension files while when i compile the file on windows platform is .exe. in book he browse the .cgi files i dont know how he makes cgi file.and run in windows xp. can anyone help me to convert exe file into cgi so that i can use this... more »
|
|
returned type of boost::bind && Address of a tmp object
|
| |
Hello, in the following code I have a pointer (to function), say p, of type double (*)(double, double, void*) and I try to fix the second argument of the function *p to a given value (using boost::bind), but the compiler complains, because of a type mismatch in an assignment which I think should be legal:... more »
|
|
singleton template class
|
| |
Will this function is singleton or do I need to declare a ctor in the derived class as public, as well as copy-ctor and assignment operator. template<typename T> class CSingleton { public: static T& Instance() { static T me; return me; } }; class MyClass: public CSingleton<MyClass>... more »
|
|
Reference counting and API (const reference vs pointer oriented)
|
| |
Hi there I have implemented a very simple smartpointer class (invasive design). And I was wondering what should be the natural API when using those in a Container. I choose to define the following operator in my smartpointer class: ... operator ObjectType * () const { return Pointer; } ... which in turn forces me to have a pointer interface (instead of const... more »
|
|
stringstream bin buffer to hex string conversion
|
| |
Hello I want to convert a char* buffer to a std::string containing a hex description of it. I use a std::stringstream in the following manner: std::tstring ToHex( const char* buffer, size_t size, bool withSize ) { std::tstringstream str; str.setf(std::ios_base::hex, std::ios::basefield); str.setf(std::ios_base::upperc ase);... more »
|
|
clear() vs destructor?
|
| |
For a std::vector, what's the difference between the clear() function and its destructor? I know their usages are different, but how about their implementations?
|
|
www.cicigoogle.cn Bape, bbc, 10 deep, ggg, lrg, ed, ca, antkul dodgen, affliction, kidrobot, coogi hoodies Options
|
| |
Dior Glasses Fendi Glasses Gucci Glasses Okely Glasses LV Glasses Prada Glasses Versace Glasses Belt Armani Belt D&G Belt ED hardy Belt Gucci Belt LV Belt Other brands belt Hat New Hat Christan Audigier Ed hardy Hat ERA Hat Gucci Hat [link] cicitr...@live.cn
|
|
|