Hi There, I had to add a certain portion of code to an application which had been considered to run stable (bewfore my addition). Now the QA guy came back to me saying that he's seeing a SIGKILL after a while (several hours) since my code addition. The code I added simply writes a string (PIDMessageBuf - declared private) and a at runtime generated... more »
Hi All, Is the following statement safe when ptr1 value is NULL Derived *ptr2 = dynamic_cast<Derived *>(ptr1) though it works properly in VC++ yet I wanted to know if it is considered safe as per the c++ standard (like delete NULL;) Thanks in advance Rahul
What is the difference to including .h files in quotes and in less- than greater-than signs? Also sometimes I see the ".h" portion included and sometimes I don't (example: #include <vector>). What's the difference?
For example, if we allocate objects like this: void foo(void) { static const size_t size = 10000000; /* ten million */ int data[size]; /* data is a very large object */ /* do something with data */ ...In C99, perhaps this: ...int main(void) { size_t n; /* This program makes sense even n is very large */... more »
Hi, I'm trying to use my own class as a map key. However something strange seems to be happening to the map which causes my program to segfault. I'm at a loss as to what this might be. Can anyone help? The complete example below segfaults for me under g++ 4.1.2. Using a debugger it seems that one of the MultiDimKey objects the map is... more »