Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralImage processing Pin
nyquisttt9-Aug-04 22:29
nyquisttt9-Aug-04 22:29 
GeneralRe: Image processing Pin
*Dreamz10-Aug-04 3:13
*Dreamz10-Aug-04 3:13 
GeneralCWebBrowser Help with Navigate function Pin
ramingo9-Aug-04 22:11
ramingo9-Aug-04 22:11 
GeneralTristate checkbox in tree Pin
alfa_aquila9-Aug-04 22:10
alfa_aquila9-Aug-04 22:10 
QuestionMemory leaks with DAO? Pin
george ivanov9-Aug-04 22:08
george ivanov9-Aug-04 22:08 
GeneralProblem in FILETIME Pin
SSD_9-Aug-04 21:36
SSD_9-Aug-04 21:36 
GeneralRe: Problem in FILETIME Pin
David Crow10-Aug-04 3:34
David Crow10-Aug-04 3:34 
GeneralHeap Allocation in Member Initialization List Pin
Johann Gerell9-Aug-04 21:20
Johann Gerell9-Aug-04 21:20 
Is that considered good or bad?

I just read a paper by Bjarne, where he used
Vector::Vector(int i) : sz(i), v(new int[i]) { }
which I never do myself.

If heap allocation is needed, then I initialize the pointer with NULL in the member initialization list (MIL) and allocate the memory with new in the ctor body. But if you're using standard compliant tools that throws correctly if new fails, then it's perhaps OK to do it in the MIL.

Any thoughts on this?

--
The Blog: Bits and Pieces
GeneralError in CBT_HOOK function Pin
fu09-Aug-04 20:42
fu09-Aug-04 20:42 
GeneralRe: Error in CBT_HOOK function Pin
Mike Beckerleg10-Aug-04 5:38
Mike Beckerleg10-Aug-04 5:38 
QuestionHow to know the current logon user is Administrator or Limited user? Pin
ErisonWu9-Aug-04 20:29
ErisonWu9-Aug-04 20:29 
AnswerRe: How to know the current logon user is Administrator or Limited user? Pin
Amarelia9-Aug-04 22:57
Amarelia9-Aug-04 22:57 
GeneralRe: How to know the current logon user is Administrator or Limited user? Pin
ErisonWu10-Aug-04 23:10
ErisonWu10-Aug-04 23:10 
AnswerRe: How to know the current logon user is Administrator or Limited user? Pin
Juha Silmujarvi10-Aug-04 1:27
Juha Silmujarvi10-Aug-04 1:27 
GeneralRe: How to know the current logon user is Administrator or Limited user? Pin
ErisonWu10-Aug-04 23:03
ErisonWu10-Aug-04 23:03 
Generalfind the current logged on user Pin
Anonymous9-Aug-04 20:13
Anonymous9-Aug-04 20:13 
GeneralRe: find the current logged on user Pin
parths9-Aug-04 20:26
parths9-Aug-04 20:26 
Questionwhat is usual gamma correction value for generic printer? Pin
baboguru9-Aug-04 19:48
baboguru9-Aug-04 19:48 
GeneralParallel Port Question Pin
zahid_ash9-Aug-04 19:44
zahid_ash9-Aug-04 19:44 
GeneralRe: Parallel Port Question Pin
Antti Keskinen9-Aug-04 21:22
Antti Keskinen9-Aug-04 21:22 
GeneralRe: Parallel Port Question Pin
zahid_ash9-Aug-04 21:33
zahid_ash9-Aug-04 21:33 
GeneralRe: Parallel Port Question Pin
Antti Keskinen10-Aug-04 0:08
Antti Keskinen10-Aug-04 0:08 
GeneralRe: Parallel Port Question Pin
zahid_ash10-Aug-04 0:38
zahid_ash10-Aug-04 0:38 
GeneralRe: Parallel Port Question Pin
Antti Keskinen10-Aug-04 1:23
Antti Keskinen10-Aug-04 1:23 
GeneralRe: Parallel Port Question Pin
zahid_ash10-Aug-04 1:59
zahid_ash10-Aug-04 1:59 

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.