Click here to Skip to main content
15,907,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ListBox with Columns Pin
Hosam Aly Mahmoud14-Jun-03 5:30
Hosam Aly Mahmoud14-Jun-03 5:30 
GeneralRe: ListBox with Columns Pin
David Crow16-Jun-03 2:34
David Crow16-Jun-03 2:34 
GeneralProblem with serial communication Pin
justin22313-Jun-03 6:15
justin22313-Jun-03 6:15 
GeneralLogging Tools for C++ Pin
Anonymous13-Jun-03 6:10
Anonymous13-Jun-03 6:10 
GeneralRe: Logging Tools for C++ Pin
David Crow13-Jun-03 7:40
David Crow13-Jun-03 7:40 
GeneralRe: Logging Tools for C++ Pin
Anonymous13-Jun-03 7:52
Anonymous13-Jun-03 7:52 
GeneralRe: Logging Tools for C++ Pin
David Crow13-Jun-03 8:00
David Crow13-Jun-03 8:00 
GeneralRe: Logging Tools for C++ Pin
Anonymous13-Jun-03 8:57
Anonymous13-Jun-03 8:57 
GeneralRe: Logging Tools for C++ Pin
David Crow13-Jun-03 9:06
David Crow13-Jun-03 9:06 
GeneralRe: Logging Tools for C++ Pin
cmk13-Jun-03 8:03
cmk13-Jun-03 8:03 
GeneralRe: Logging Tools for C++ Pin
Anonymous13-Jun-03 8:58
Anonymous13-Jun-03 8:58 
GeneralRe: Logging Tools for C++ Pin
John M. Drescher13-Jun-03 10:50
John M. Drescher13-Jun-03 10:50 
GeneralDialogBox won't quit Pin
Brigg Thorp13-Jun-03 5:22
Brigg Thorp13-Jun-03 5:22 
GeneralRe: DialogBox won't quit Pin
valikac13-Jun-03 6:25
valikac13-Jun-03 6:25 
Generalresizable columns Pin
hdaly13-Jun-03 5:13
hdaly13-Jun-03 5:13 
GeneralRe: resizable columns Pin
David Crow13-Jun-03 5:27
David Crow13-Jun-03 5:27 
GeneralVery simple question :o) Pin
MemLeak13-Jun-03 4:32
MemLeak13-Jun-03 4:32 
GeneralRe: Very simple question :o) Pin
Roger Allen13-Jun-03 4:46
Roger Allen13-Jun-03 4:46 
You could have written:

CObject* MyClass::MyFunction(int value)
{
 return new Object(value);
}


As new returns NULL if the allocation fails.

That said, what you are doing is bad coding practice as whoever calls the function needs to remember to delete the returned pointer, and its possible to use a function in such a way that you don't get a copy of the returned pointer, as it would get assigned to a temporary. So its very bad practice. See if you can do it in some other way.


Roger Allen
Sonork 100.10016

Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
GeneralRe: Very simple question :o) Pin
Joan M13-Jun-03 7:59
professionalJoan M13-Jun-03 7:59 
GeneralRetrieving sql-queries from a database connection using ADO Pin
Anders Sandberg13-Jun-03 4:28
Anders Sandberg13-Jun-03 4:28 
GeneralRe: Retrieving sql-queries from a database connection using ADO Pin
basementman13-Jun-03 5:10
basementman13-Jun-03 5:10 
GeneralRe: Retrieving sql-queries from a database connection using ADO Pin
Anders Sandberg14-Jun-03 5:26
Anders Sandberg14-Jun-03 5:26 
GeneralRe: Retrieving sql-queries from a database connection using ADO Pin
Anders Sandberg14-Jun-03 5:29
Anders Sandberg14-Jun-03 5:29 
QuestionIs WaitCommEvent() buggy? Pin
justin22313-Jun-03 4:10
justin22313-Jun-03 4:10 
AnswerRe: Is WaitCommEvent() buggy? Pin
Trollslayer13-Jun-03 6:04
mentorTrollslayer13-Jun-03 6:04 

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.