Description:
The object-oriented C++ language.
|
|
|
free memory?
|
| |
Hi, All: I'm new to C++ and get a little confused about the way to free memory. It seems to me that both delete and free can do the job, then what's the difference between them? Is delete used to free the memory allocated from new, and free to free the memory allocated by malloc? Thanks a lot.... more »
|
|
Please help
|
| |
I am new to C++ Programming. So my question is Can we write a function to use it in program?
|
|
visualisation with freeglut, opengl
|
| |
Hello everyone, I am writing a simulation program in C++. The data includes a set of spheres packing in a 3D box. So, I have the coordinates and the radius of the spheres. My question is how to visualize them (as colored solid spheres) using a easy-to-use C++ library? I've heard of freeglut, opengl but could... more »
|
|
A Sample auto_ptr implementation
|
| |
Hi All, I'm building a sample application that uses a custom auto_ptr implementation. The program crashes with the following output:- Output (Debug Assertion failed) ---------- release called copy constructor aap: ptr2= 10 aap: ptr3= 20 aap: ptr3= 10... more »
|
|
Operator...
|
| |
this has probably been asked/suggested many timtes before, but i just thought of it. why is there no such thing as something like operator...() imho it would allow us to smooth off one of the sharper corners of c+ +. you could maybe do something like this: class string { public: const char *operator...() const... more »
|
|
Binary Search Tree Verification Help
|
| |
Hello to all expect software engineer, i have create a binary search tree. I know to know what is your opinion about my program. [code] template <typename T> class treeNode { public: T key; T value; treeNode<T> *leftNode; treeNode<T> *rightNode; treeNode() : key(T()), value(T()), leftNode(0),... more »
|
|
Nested class and architecture of C++ class
|
| |
Hi, I am trying to port some C class routines into C++. THe original functions are use to set/get properties of buttons inside a toolbar : // This function is used to set btton text // Parameters : dwIndexOrId : index or cmd id // EGetMode : select button by ID or by cmd index enum EGetMode { BY_CMD,... more »
|
|
Positioning of catch(...)
|
| |
Hi everyone, I recently came across a quiz question. Does the standard say anything about catch(...) being the first catch statement? try { ...catch(...) // <- 'hides' subsequent catching { ...catch(A) { ...catch(B) { ...I've seen numerous examples where catch(...) appears first (eg: Bjorne), but code doesn't compile using MS C++, so does this mean that... more »
|
|
priority_queue help
|
| |
Can anyone help me w/ a priority_queue. I'm generating MyEvent classes and I put them on a priority_queue, but I don't know how to get them in priority. The priority is the event w/ the smallest timestamp. // just a wrapper around priority_queue pq = new MyPriorityQueue(); // I generate 10 events w/ a random timestamp... more »
|
|
|