Click here to Skip to main content

C / C++ / MFC

    RSS: RSS Feed

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
GeneralRe: starting an application at startup, before logging in PinsussAnonymous2:27 4 Aug '04  
GeneralRe: starting an application at startup, before logging in PinmemberAntony M Kancidrowski3:49 4 Aug '04  
GeneralRe: starting an application at startup, before logging in PinsussAnonymous2:24 4 Aug '04  
QuestionSend Messages? PinmemberZero_One_ADO19:10 3 Aug '04  
Answerno Pinmemberbikram singh19:44 3 Aug '04  
GeneralVisual C++ WinSNMP API: PinsussAlan Lewis17:00 3 Aug '04  
GeneralOptimization PinmemberSibilant15:54 3 Aug '04  
GeneralVisual C++ static member initialization PinmemberIndrawati15:25 3 Aug '04  
Hi
 
Let's say I have a class A. A has a static member whose type is another class, let's call it class B. Usually in my C++ application I declare this static member at the top of A's .cpp file as follows:
 
B A::instanceofB(aString)
 
where aString is of std::string type and is the argument for B's constructor.
 
That works OK and I got the result I wanted. However, yesterday I use that file on a different project (it's a directshow filter project) and it seems that instanceofB is never initialized there! I tried to debug it by making B's constructor to write to a file, but when I checked, the file was never written into, it's as if B's constructor's never called at all. I did that for B's default constructor too, but with the same result. I checked in all the project settings but I couldn't find out what causes this discrepancy.
 
Could someone point me on what's the possible causes for this?
 
Thanks!
GeneralRe: Visual C++ static member initialization Pinmemberboggelibopp23:10 3 Aug '04  
GeneralRe: Visual C++ static member initialization Pinmembercmk1:51 4 Aug '04  
GeneralRe: Visual C++ static member initialization PinmemberIndrawati16:09 4 Aug '04  
QuestionHow to create a Point Custom Control PinmemberSSquared14:28 3 Aug '04  
GeneralMultiline toolbar button Pinmemberblase_3114:23 3 Aug '04  
Generaltotal number digit in string name. Pinmemberpnpfriend12:43 3 Aug '04  
GeneralRe: total number digit in string name. PinmemberBhaskar1:37 4 Aug '04  
GeneralRe: total number digit in string name. PinmemberIvan Cachicatari5:02 4 Aug '04  
GeneralRe: total number digit in string name. Pinmemberpnpfriend5:56 4 Aug '04  
GeneralLoading Bitmaps PinmemberDon1211:57 3 Aug '04  
GeneralOpen With... Dialog in Windows Explorer Pinmemberotrcomm11:16 3 Aug '04  
GeneralRe: Open With... Dialog in Windows Explorer Pinmemberpalbano11:33 3 Aug '04  
GeneralRe: Open With... Dialog in Windows Explorer Pinmemberotrcomm13:04 3 Aug '04  
GeneralRe: Open With... Dialog in Windows Explorer Pinmemberpalbano11:59 4 Aug '04  
GeneralRe: Open With... Dialog in Windows Explorer Pinmemberotrcomm17:15 4 Aug '04  
GeneralRe: Open With... Dialog in Windows Explorer Pinmemberpalbano17:33 4 Aug '04  
GeneralRe: Open With... Dialog in Windows Explorer Pinmemberotrcomm19:33 4 Aug '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.5.120210.1 | Last Updated 14 Feb 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid