Click here to Skip to main content
15,900,511 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Tree Controls _without_ image lists? Pin
Tomasz Sowinski18-May-01 8:15
Tomasz Sowinski18-May-01 8:15 
GeneralRe: Tree Controls _without_ image lists? Pin
Jim A. Johnson18-May-01 9:25
Jim A. Johnson18-May-01 9:25 
GeneralRe: Tree Controls _without_ image lists? Pin
Tomasz Sowinski19-May-01 0:12
Tomasz Sowinski19-May-01 0:12 
GeneralPeer-to-Peer with Windows-Sockets Pin
18-May-01 5:25
suss18-May-01 5:25 
GeneralRe: Peer-to-Peer with Windows-Sockets Pin
18-May-01 6:50
suss18-May-01 6:50 
Generalcapture a rectangle in a static image and resize it in another window Pin
Frederico Levesque18-May-01 4:44
Frederico Levesque18-May-01 4:44 
GeneralRe: capture a rectangle in a static image and resize it in another window Pin
18-May-01 5:08
suss18-May-01 5:08 
GeneralClasses, new, delete, destructors Pin
José Luis Sogorb18-May-01 4:41
José Luis Sogorb18-May-01 4:41 
Hi:
I'm new in C++, and visual c++ programming and I have problems in a program I'm doing. I have a class like this:

class CDatos : public CDocument
{
protected:
DECLARE_SERIAL(CDatos)
CDatos();
public:
CDatos* GetDocument();

int dia;
int mes;
int anno;
int horaActual;
CString Titulo;

int hora[24];
int temp[24];
int rocio[24];
int pres[24];
int vel[24];
char direccion[24][9];
public:

virtual void Serialize (CArchive& ar);
virtual ~CDatos();
};

After it, I do this (in a .cpp file:
CDatos datosF;

Then I read from a file and put data into member variables, something like this: fscanf(fp,"%d.%d.%d %d", &datosF.anno,&datosF.mes,&datosF.dia,&datosF.horaActual);.....etc
, and I draw a graphic with this data. If I open 2 or 3 files I don't have problems, but when I try to open more, the system memory goes down quickly and the graphics began to do strange things. I suppose the problem is than something overwrites memory.
Can anybody help me to clean memory data after reading a new file? I suppose the solution is using 'new', 'delete' or destructor class, but I don`t know how to do it.
Thank you very much.

GeneralRe: Classes, new, delete, destructors Pin
James R. Twine18-May-01 4:50
James R. Twine18-May-01 4:50 
GeneralRe: Classes, new, delete, destructors Pin
José Luis Sogorb18-May-01 5:16
José Luis Sogorb18-May-01 5:16 
GeneralRe: Classes, new, delete, destructors Pin
James R. Twine18-May-01 8:32
James R. Twine18-May-01 8:32 
GeneralRe: Classes, new, delete, destructors Pin
José Luis Sogorb18-May-01 9:40
José Luis Sogorb18-May-01 9:40 
GeneralRe: Classes, new, delete, destructors Pin
James R. Twine18-May-01 10:14
James R. Twine18-May-01 10:14 
GeneralRe: Classes, new, delete, destructors Pin
José Luis Sogorb18-May-01 23:22
José Luis Sogorb18-May-01 23:22 
GeneralRe: Classes, new, delete, destructors Pin
James R. Twine19-May-01 2:16
James R. Twine19-May-01 2:16 
GeneralMailslot Problem Pin
18-May-01 4:27
suss18-May-01 4:27 
GeneralGeneral Question Pin
mr200318-May-01 4:11
mr200318-May-01 4:11 
GeneralRe: General Question Pin
Stan Shannon18-May-01 9:45
Stan Shannon18-May-01 9:45 
GeneralMemory Mapped Files and Security under IIS 5.0 / Win2K... Pin
James R. Twine18-May-01 3:15
James R. Twine18-May-01 3:15 
GeneralDrag and Drop Pin
Eran18-May-01 2:55
Eran18-May-01 2:55 
GeneralRe: Drag and Drop Pin
Tomasz Sowinski18-May-01 3:06
Tomasz Sowinski18-May-01 3:06 
GeneralTCP/IP Socket programming Pin
Gerry18-May-01 2:03
Gerry18-May-01 2:03 
GeneralRe: TCP/IP Socket programming Pin
18-May-01 2:29
suss18-May-01 2:29 
GeneralRe: TCP/IP Socket programming Pin
Gerry18-May-01 2:45
Gerry18-May-01 2:45 
GeneralRe: TCP/IP Socket programming Pin
markkuk20-May-01 21:06
markkuk20-May-01 21:06 

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.