Re: Critical section ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mihajlo Cvetanovic (mac_at_RnEeMtOsVeEt.co.yu)
Date: 12/21/04

  • Next message: David Lowndes: "Re: Child wondow's ID."
    Date: Tue, 21 Dec 2004 09:41:01 +0100
    
    

    Jason wrote:
    > I recently was asked to answer this
    >
    > ...
    >
    > void IncrementIndex(int iIndex)
    > {
    > ...
    > g_nNums[nIndex++];
    > ...
    > }

    You have used both nIndex and iIndex in ambiguous way, so I'll take it
    it's the same variable. Shouldn't "int iIndex" actually be "int &iIndex"?


  • Next message: David Lowndes: "Re: Child wondow's ID."

    Relevant Pages

    • Re: Critical section ?
      ... > Jason wrote: ... >> void IncrementIndex ... > You have used both nIndex and iIndex in ambiguous way, ...
      (microsoft.public.vc.mfc)
    • Re: CTabCtrl force background repaint
      ... BOOL CMyTab::AddTab(int iIndex, const CString& csLabel, int iImage) ...
      (microsoft.public.vc.mfc)
    • Critical section ?
      ... DWORD WINAPI Thread(LPVOID lpvParams) ... void IncrementIndex(int iIndex) ... How can IncrementIndex be written so that it is thread safe and won't ...
      (microsoft.public.vc.mfc)
    • Critical section ?
      ... DWORD WINAPI Thread(LPVOID lpvParams) ... void IncrementIndex(int iIndex) ... How can IncrementIndex be written so that it is thread safe and won't ...
      (alt.comp.lang.learn.c-cpp)
    • critical section ?
      ... DWORD WINAPI Thread(LPVOID lpvParams) ... void IncrementIndex(int iIndex) ... How can IncrementIndex be written so that it is thread safe and won't ...
      (comp.programming)