#41 Assigning a value to a var when declaring it

closed
nobody
5
2006-01-11
2003-12-10
Gael Martin
No

Using CVS 1.90:

If I declare a variable and also assign a value to it:

_HHwinHwnd : HWND = 0; //Help Window handle

It get converted to:

_HHwinHwnd : const HWND = 0; //Help Window handle

You can't initialize variable when declaring it in C++. It
should be converted to:

const HWND _HHwinHwnd; //Help Window handle
Enventuall adding also a Doxygen comment to indicate
its initial value /*!< _HHwinHwnd = 0 */

Discussion

  • Darren Bowles
    Darren Bowles
    2003-12-10

    Logged In: YES
    user_id=73730

    Actually, we should be able to do

    const HWND _HHwinHwnd = 0; ///< Help Window handle

     
  • Darren Bowles
    Darren Bowles
    2006-01-11

    • status: open --> closed