The problem is that you need to initialize the LPDIRECTDRAWSURFACE that you pass to the constructor, or create the surface inside the constructor. Use CreateSurface to create the surface; it will return an LPDIRECTDRAWSURFACE that you can use in your class.
So, you could do something like this:
void main({ LPDIRECTDRAWSURFACE* l_ptSurf; DDSURFACEDESC ddsd; HRESULT ddreturn; // Create the surface as offscreen, system memory // (not video memory). // Assumes ''ddobj'' points to direct draw object. ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; ddsd.dwHeight = Height; // Surface height ddsd.dwWidth = Width; // Surface width ddreturn = ddobj->CreateSurface(&ddsd, &l_ptSurf, NULL); if (ddreturn != DD_OK) exit(1); // Couldn''t create surface MySurf* l_pNewSurf = new MySurf(l_ptSurf); g_aArray.push_back(l_pNewSurf);}