Click here to Skip to main content
15,915,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: maintain logfile of the accessed files Pin
vipinasda28-Dec-05 3:41
vipinasda28-Dec-05 3:41 
AnswerRe: maintain logfile of the accessed files Pin
David Crow28-Dec-05 5:36
David Crow28-Dec-05 5:36 
AnswerRe: maintain logfile of the accessed files Pin
basementman28-Dec-05 5:38
basementman28-Dec-05 5:38 
Questiondetecting memory leaks? Pin
9ine28-Dec-05 1:39
9ine28-Dec-05 1:39 
AnswerRe: detecting memory leaks? Pin
Axter28-Dec-05 2:27
professionalAxter28-Dec-05 2:27 
GeneralRe: detecting memory leaks? Pin
9ine28-Dec-05 4:50
9ine28-Dec-05 4:50 
GeneralRe: detecting memory leaks? Pin
Axter28-Dec-05 4:59
professionalAxter28-Dec-05 4:59 
GeneralRe: detecting memory leaks? Pin
9ine28-Dec-05 23:47
9ine28-Dec-05 23:47 
No I'm not inclined to use it in release version, I'm sure I've got debug compiler option and I included it as you said:

#include "stdafx.h"
#include "sGen.h"
#include "sGenDlg.h"
#include ".\sgendlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


#include "Lib\lib.h"
#include "Lib\quantize.h"

#include "LibST\scomplexity.h"

// CsGenDlg dialog

#include "leaktracker.h"

CsGenDlg::CsGenDlg(CWnd* pParent /*=NULL*/)
: CDialog(CsGenDlg::IDD, pParent)
, m_freq(10)
, m_sr(128)
, m_len(30), data(0)
, m_asize(2)
, qt(0)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

All the same compiler errors again? it doesnt want to be compiled, I use VS2003.

As for the first time I did not include leaktracker.h in any cpp file at all, which is not proper as I've read from its manual that it should be included at least in one file, and I ran it in debug mode (which we select from proj settings->config manager->active solution config), and to test it I used on purpose allocation of memory with new command without deleting it.
What is your suggestions?

look at the errors again:
Compiling...
sGenDlg.cpp
**************************************************************************************
Note: Including leaktracker implementation... DO NOT USE THIS BUILD FOR PRODUCTION!!!
**************************************************************************************
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2433: 'new' : 'inline' not permitted on data declarations
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2365: 'new' : redefinition; previous definition was a 'member function'
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2078: too many initializers
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2440: 'initializing' : cannot convert from 'int' to 'void *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2143: syntax error : missing ';' before '('
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2226: syntax error : unexpected type 'size_t'
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2059: syntax error : ')'
c:\Documents and Settings\yc274\My Documents\Visual Studio Projects\COMPL\sGen\leaktracker.h(184) : error C2143: syntax error : missing ';' before '{'

and so on...

9ine
GeneralRe: detecting memory leaks? Pin
Axter29-Dec-05 1:05
professionalAxter29-Dec-05 1:05 
GeneralRe: detecting memory leaks? Pin
9ine29-Dec-05 5:31
9ine29-Dec-05 5:31 
AnswerRe: detecting memory leaks? Pin
vipinasda28-Dec-05 3:38
vipinasda28-Dec-05 3:38 
GeneralRe: detecting memory leaks? Pin
Axter28-Dec-05 5:02
professionalAxter28-Dec-05 5:02 
GeneralRe: detecting memory leaks? Pin
vipinasda28-Dec-05 6:15
vipinasda28-Dec-05 6:15 
AnswerRe: detecting memory leaks? Pin
Prakash Nadar28-Dec-05 5:30
Prakash Nadar28-Dec-05 5:30 
AnswerRe: detecting memory leaks? Pin
MF28-Dec-05 15:19
MF28-Dec-05 15:19 
QuestionConverting int to char Pin
RedDragon2k28-Dec-05 1:17
RedDragon2k28-Dec-05 1:17 
AnswerRe: Converting int to char Pin
sunit528-Dec-05 1:29
sunit528-Dec-05 1:29 
GeneralRe: Converting int to char Pin
RedDragon2k28-Dec-05 1:47
RedDragon2k28-Dec-05 1:47 
GeneralRe: Converting int to char Pin
sunit528-Dec-05 1:58
sunit528-Dec-05 1:58 
GeneralRe: Converting int to char Pin
vikas amin28-Dec-05 1:58
vikas amin28-Dec-05 1:58 
GeneralRe: Converting int to char Pin
RedDragon2k28-Dec-05 2:05
RedDragon2k28-Dec-05 2:05 
AnswerRe: Converting int to char Pin
David Crow28-Dec-05 5:40
David Crow28-Dec-05 5:40 
AnswerRe: Converting int to char Pin
Gary R. Wheeler28-Dec-05 5:54
Gary R. Wheeler28-Dec-05 5:54 
QuestionQuerying CSV file Pin
Rajesh R Subramanian28-Dec-05 0:42
professionalRajesh R Subramanian28-Dec-05 0:42 
AnswerRe: Querying CSV file Pin
ThatsAlok28-Dec-05 0:56
ThatsAlok28-Dec-05 0:56 

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.