Re: Critical section ?
From: Jason (yo_at_yo.com)
Date: 12/21/04
- Next message: Stephen Kellett: "Re: CString leaks memory."
- Previous message: Curtis: "How to move standard buttons in VS.NET2003 wizards?"
- In reply to: Mihajlo Cvetanovic: "Re: Critical section ?"
- Next in thread: Naren: "RE: Critical section ?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Dec 2004 12:01:54 -0500
"Mihajlo Cvetanovic" <mac@RnEeMtOsVeEt.co.yu> wrote in message
news:41C7E19D.7080902@RnEeMtOsVeEt.co.yu...
> 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"?
>
yeah I made an error in my typing it is like this
void IncrementIndex(int nIndex)
{
...
g_nNums[nIndex++];
...
}
which I realize now it should be
g_nNums[nIndex]++;
- Next message: Stephen Kellett: "Re: CString leaks memory."
- Previous message: Curtis: "How to move standard buttons in VS.NET2003 wizards?"
- In reply to: Mihajlo Cvetanovic: "Re: Critical section ?"
- Next in thread: Naren: "RE: Critical section ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|