Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ 6 connect to Access using ODBC Pin
David Crow17-Feb-06 2:28
David Crow17-Feb-06 2:28 
QuestionHow to hook the Shell View Window Pin
kil ramesh14-Feb-06 20:08
kil ramesh14-Feb-06 20:08 
QuestionHow to stop mouse hover notification Pin
BicycleTheif14-Feb-06 19:55
BicycleTheif14-Feb-06 19:55 
QuestionNetwork connection status checking Pin
Tony Kurishunkal14-Feb-06 19:42
Tony Kurishunkal14-Feb-06 19:42 
AnswerRe: Network connection status checking Pin
David Crow15-Feb-06 4:09
David Crow15-Feb-06 4:09 
AnswerRe: Network connection status checking Pin
ThatsAlok16-Feb-06 2:33
ThatsAlok16-Feb-06 2:33 
QuestionClient Edge of Progress Bar? Pin
Owner drawn14-Feb-06 19:38
Owner drawn14-Feb-06 19:38 
QuestionRelational Database Pin
moodsey21114-Feb-06 19:27
moodsey21114-Feb-06 19:27 
AnswerRe: Relational Database Pin
Ashutosh_shashi14-Feb-06 19:33
Ashutosh_shashi14-Feb-06 19:33 
GeneralRe: Relational Database Pin
moodsey21114-Feb-06 19:43
moodsey21114-Feb-06 19:43 
GeneralRe: Relational Database Pin
Ashutosh_shashi14-Feb-06 22:11
Ashutosh_shashi14-Feb-06 22:11 
QuestionRe: Relational Database Pin
David Crow15-Feb-06 4:12
David Crow15-Feb-06 4:12 
Questionmemory leak!!!!!! Pin
naguu14-Feb-06 18:39
naguu14-Feb-06 18:39 
AnswerRe: memory leak!!!!!! Pin
namaskaaram14-Feb-06 18:42
namaskaaram14-Feb-06 18:42 
AnswerRe: memory leak!!!!!! Pin
Stephen Hewitt14-Feb-06 18:55
Stephen Hewitt14-Feb-06 18:55 
AnswerRe: memory leak!!!!!! Pin
Ashutosh_shashi14-Feb-06 19:20
Ashutosh_shashi14-Feb-06 19:20 
GeneralRe: memory leak!!!!!! Pin
namaskaaram14-Feb-06 19:42
namaskaaram14-Feb-06 19:42 
GeneralRe: memory leak!!!!!! Pin
Ryan Binns14-Feb-06 19:51
Ryan Binns14-Feb-06 19:51 
GeneralRe: memory leak!!!!!! Pin
BadKarma14-Feb-06 20:29
BadKarma14-Feb-06 20:29 
GeneralRe: memory leak!!!!!! Pin
Ryan Binns14-Feb-06 21:27
Ryan Binns14-Feb-06 21:27 
GeneralRe: memory leak!!!!!! Pin
BadKarma14-Feb-06 21:43
BadKarma14-Feb-06 21:43 
I know,

I was just trying to point out for naguu that altough setting a pointer to NULL and then deleting wont cause an error it will cause a memory leak. Which was (one of) his first problems.

To conclude:
char * getmestring()
{
char *str = new char[20];

// FROM <a href = "http://www.codeproject.com/script/comments/forums.asp?msg=1371347&forumid=1647#xx1371359xx" rel="nofollow">Stephen Hewitt</a>[<a href = "http://www.codeproject.com/script/comments/forums.asp?msg=1371347&forumid=1647#xx1371359xx" target = "_blank" rel="nofollow">^</a>]
// str = "myname";
strcpy(str, "myname"); 
return str;
}
int main()
{

// FROM <a href = "http://www.codeproject.com/script/comments/forums.asp?msg=1371347&forumid=1647#xx1371347xx" rel="nofollow">namaskaaram</a>[<a href = "http://www.codeproject.com/script/comments/forums.asp?msg=1371347&forumid=1647#xx1371347xx" target = "_blank" rel="nofollow">^</a>]
//char name = getmestring();
char *name = getmestring(); 
cout<<name<<endl;
if(name != NULL)
{
delete [] name; 
}
}


codito ergo sum
GeneralRe: memory leak!!!!!! Pin
Ryan Binns14-Feb-06 21:48
Ryan Binns14-Feb-06 21:48 
GeneralRe: memory leak!!!!!! Pin
namaskaaram14-Feb-06 21:34
namaskaaram14-Feb-06 21:34 
GeneralRe: memory leak!!!!!! Pin
Ryan Binns14-Feb-06 21:44
Ryan Binns14-Feb-06 21:44 
GeneralRe: memory leak!!!!!! Pin
Ashutosh_shashi14-Feb-06 21:18
Ashutosh_shashi14-Feb-06 21:18 

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.