Click here to Skip to main content
16,012,223 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBitmap Pin
suresh_sathya15-Jul-02 18:40
suresh_sathya15-Jul-02 18:40 
GeneralRe: Bitmap Pin
Christian Graus15-Jul-02 19:03
protectorChristian Graus15-Jul-02 19:03 
GeneralRe: Bitmap Pin
suresh_sathya15-Jul-02 23:52
suresh_sathya15-Jul-02 23:52 
Generalsimple C thread functionality question. Pin
nosherwan15-Jul-02 15:01
nosherwan15-Jul-02 15:01 
GeneralRe: simple C thread functionality question. Pin
Nish Nishant15-Jul-02 15:55
sitebuilderNish Nishant15-Jul-02 15:55 
GeneralCImageList Pin
Steve L.15-Jul-02 12:49
Steve L.15-Jul-02 12:49 
GeneralRe: CImageList Pin
Shog916-Jul-02 7:22
sitebuilderShog916-Jul-02 7:22 
Generalinitialising elements using new foo[] Pin
moredip15-Jul-02 12:39
moredip15-Jul-02 12:39 
Does anyone know if it's possible to pass arguments to the constructor of array elements?

For example: I have a class Cfoo
class Cfoo
{
public:
Cfoo( int arg1 = 0 );

private:
int m_arg1;
}

I want to create an array of 200 Cfoo's, and initialise them with Cfoo(-1). I've tried
aFoo = new Cfoo(-1)[200]; //nope, doesn't work

aFoo = new Cfoo[200](-1); //neither does this

I've run out of ideas Frown | :(

Is it impossible to call ctors on members of dynamically declared arrays?

TIA,

Pete
GeneralRe: initialising elements using new foo[] Pin
Christian Graus15-Jul-02 12:51
protectorChristian Graus15-Jul-02 12:51 
GeneralRe: initialising elements using new foo[] Pin
Chris Losinger15-Jul-02 13:48
professionalChris Losinger15-Jul-02 13:48 
GeneralRe: initialising elements using new foo[] Pin
Bernhard15-Jul-02 23:55
Bernhard15-Jul-02 23:55 
GeneralRe: initialising elements using new foo[] Pin
moredip16-Jul-02 7:28
moredip16-Jul-02 7:28 
GeneralWhy... Pin
Frank Deo15-Jul-02 12:28
Frank Deo15-Jul-02 12:28 
GeneralRe: Why... Pin
Christian Graus15-Jul-02 12:31
protectorChristian Graus15-Jul-02 12:31 
GeneralRe: Why... Pin
Frank Deo15-Jul-02 12:35
Frank Deo15-Jul-02 12:35 
GeneralRe: Why... Pin
Christian Graus15-Jul-02 12:53
protectorChristian Graus15-Jul-02 12:53 
GeneralRe: Why... Pin
Frank Deo15-Jul-02 13:00
Frank Deo15-Jul-02 13:00 
GeneralRe: Why... Pin
Nish Nishant15-Jul-02 14:56
sitebuilderNish Nishant15-Jul-02 14:56 
GeneralGetting RuntimeClass of a CObject Derived Class Pin
MightyThor15-Jul-02 12:16
MightyThor15-Jul-02 12:16 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
Christian Graus15-Jul-02 12:34
protectorChristian Graus15-Jul-02 12:34 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
Roman Fadeyev15-Jul-02 19:03
Roman Fadeyev15-Jul-02 19:03 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
Christian Graus15-Jul-02 19:13
protectorChristian Graus15-Jul-02 19:13 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
MightyThor15-Jul-02 23:35
MightyThor15-Jul-02 23:35 
Generalexcel automation, hprocess is not closing Pin
pnpfriend15-Jul-02 12:10
pnpfriend15-Jul-02 12:10 
Generalplease...... Pin
pnpfriend16-Jul-02 2:44
pnpfriend16-Jul-02 2:44 

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.