Click here to Skip to main content
16,005,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create a WinZip file and is there a way to prevent winzip from reading it Pin
Jonathan Craig26-Feb-03 4:11
Jonathan Craig26-Feb-03 4:11 
GeneralDao Classes Pin
Anonymous26-Feb-03 1:29
Anonymous26-Feb-03 1:29 
GeneralRe: Dao Classes Pin
includeh1026-Feb-03 2:36
includeh1026-Feb-03 2:36 
GeneralRe: Dao Classes Pin
Anonymous26-Feb-03 3:03
Anonymous26-Feb-03 3:03 
GeneralRe: Dao Classes Pin
includeh1026-Feb-03 6:49
includeh1026-Feb-03 6:49 
GeneralRe: Dao Classes Pin
Anonymous27-Feb-03 21:36
Anonymous27-Feb-03 21:36 
GeneralStatic destructors called after main Pin
krisn26-Feb-03 1:23
krisn26-Feb-03 1:23 
GeneralRe: Static destructors called after main Pin
Joaquín M López Muñoz26-Feb-03 1:41
Joaquín M López Muñoz26-Feb-03 1:41 
C++ does not guarentee any particular order of static initialization across compilation units (different .cpps in plain English). But there's a nifty trick to ensure that a given static constructor is executed the first in your program, and hence its destructor is called the very last:
// memorychecker.h
 
class memory_checker
{
  memory_checker();
  ~memory_checker()
  {
    CheckMemory();
  }
public:
  static void launch()
  {
    static memory_checker mc;
  }
};
 
struct memory_checker_laucher
{
  memory_checker_laucher()
  {
    memory_check::launch();
  }  
};
 
static memory_checker_launcher mcl__;
Now, if you #include "memorycheck.h" at the beginning of every .cpp of your program, you will get CheckMemory to be called when everybody else has left the party.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Generalmemory problem! Pin
Gérald Mercet26-Feb-03 1:18
Gérald Mercet26-Feb-03 1:18 
GeneralRe: memory problem! Pin
Joaquín M López Muñoz26-Feb-03 1:24
Joaquín M López Muñoz26-Feb-03 1:24 
GeneralRe: memory problem! Pin
Gérald Mercet26-Feb-03 1:27
Gérald Mercet26-Feb-03 1:27 
GeneralRe: memory problem! Pin
Joaquín M López Muñoz26-Feb-03 1:30
Joaquín M López Muñoz26-Feb-03 1:30 
GeneralRe: memory problem! Pin
Gérald Mercet26-Feb-03 4:31
Gérald Mercet26-Feb-03 4:31 
GeneralRe: memory problem! Pin
Gérald Mercet26-Feb-03 1:33
Gérald Mercet26-Feb-03 1:33 
QuestionHow do you drag & drop an icon in VC++6? Pin
Damien McGauley26-Feb-03 1:03
Damien McGauley26-Feb-03 1:03 
GeneralWM_MOUSEHOVER Pin
zeki yugnak25-Feb-03 23:48
zeki yugnak25-Feb-03 23:48 
GeneralRe: WM_MOUSEHOVER Pin
vikramlinux26-Feb-03 0:00
vikramlinux26-Feb-03 0:00 
GeneralRe: WM_MOUSEHOVER Pin
vikramlinux26-Feb-03 0:02
vikramlinux26-Feb-03 0:02 
GeneralRe: WM_MOUSEHOVER Pin
zeki yugnak26-Feb-03 1:18
zeki yugnak26-Feb-03 1:18 
GeneralRe: WM_MOUSEHOVER Pin
vikramlinux26-Feb-03 18:10
vikramlinux26-Feb-03 18:10 
GeneralRe: WM_MOUSEHOVER Pin
zeki yugnak27-Feb-03 8:30
zeki yugnak27-Feb-03 8:30 
GeneralProblem of "\r\n" Pin
adapterJohn25-Feb-03 22:49
adapterJohn25-Feb-03 22:49 
GeneralRe: Problem of "\r\n" Pin
peterchen25-Feb-03 23:05
peterchen25-Feb-03 23:05 
GeneralRe: Problem of "\r\n" Pin
KarstenK25-Feb-03 23:08
mveKarstenK25-Feb-03 23:08 
GeneralRe: Problem of "\r\n" Pin
adapterJohn26-Feb-03 0:07
adapterJohn26-Feb-03 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.