digitalmars.D.learn - C++ const to D2 const
- BLS (12/12) Dec 23 2007 Sorry about the ignorance, but I am not a C++ programmer.
- Bill Baxter (7/20) Dec 23 2007 Yes it does. In D you have to specify all the members. RECT should
- Jarrett Billingsley (5/9) Dec 23 2007 ...except that if this isn't a static struct declaration, you have to wr...
Sorry about the ignorance, but I am not a C++ programmer. C++ / WIN API prog. HINSTANCE GetResourceHandle() const { return (m_hResource ? m_hResource:m_hInstance); } D2 invariant HINSTANCE GetResourceHandle() Just guessing, can you confirm ? ...and by the way a very confusing C++ language construct. RECT r = {0}; Does it mean : Set all members to 0 ? How to port this stuff into D ... Thanks in advance. Bjoern
Dec 23 2007
BLS wrote:Sorry about the ignorance, but I am not a C++ programmer. C++ / WIN API prog. HINSTANCE GetResourceHandle() const { return (m_hResource ? m_hResource:m_hInstance); }D2 invariant HINSTANCE GetResourceHandle() Just guessing, can you confirm ?No idea there....and by the way a very confusing C++ language construct. RECT r = {0}; Does it mean : Set all members to 0 ? How to port this stuff into D ...Yes it does. In D you have to specify all the members. RECT should have 4, so RECT r = {0,0,0,0}; should do it. --bb
Dec 23 2007
"Bill Baxter" <dnewsgroup billbaxter.com> wrote in message news:fkm8vn$2p75$1 digitalmars.com...Yes it does. In D you have to specify all the members. RECT should have 4, so RECT r = {0,0,0,0}; should do it....except that if this isn't a static struct declaration, you have to write: RECT r = RECT(0, 0, 0, 0); :P
Dec 23 2007