Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Detours TerminateProcess API Function Pin
Jijo.Raj8-Jun-08 7:13
Jijo.Raj8-Jun-08 7:13 
AnswerRe: Detours TerminateProcess API Function Pin
Saurabh.Garg8-Jun-08 17:04
Saurabh.Garg8-Jun-08 17:04 
AnswerRe: Detours TerminateProcess API Function Pin
darx8-Jun-08 22:37
darx8-Jun-08 22:37 
Questionif statment Pin
sofia_1118-Jun-08 0:39
sofia_1118-Jun-08 0:39 
AnswerRe: if statment Pin
sudhir_Kumar8-Jun-08 1:28
sudhir_Kumar8-Jun-08 1:28 
AnswerRe: if statment Pin
Cedric Moonen8-Jun-08 1:44
Cedric Moonen8-Jun-08 1:44 
GeneralRe: if statment Pin
sofia_1118-Jun-08 2:15
sofia_1118-Jun-08 2:15 
GeneralRe: if statment Pin
Jijo.Raj8-Jun-08 3:37
Jijo.Raj8-Jun-08 3:37 
Just adding one more point. This error occurs often and the best practice to avoid is to follow the following defensive style,

// The normal style.
if( variable == constant )
{
}

// The defensive style.
if( constant == variable )
{
}


For instance,

// This if statement won't cause error. Because it become an assignment statement.
if( variable = 1)
{
}

// But this one does. If you forgot the extra = here, then it will become
// assigning variable to constant and compiler will show error.
if( 1 = variable )
{
}


At first its a bit irritation for our eyes, but still it can save a lot of time. Smile | :)

Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

GeneralRe: if statment Pin
Gary R. Wheeler8-Jun-08 10:03
Gary R. Wheeler8-Jun-08 10:03 
AnswerRe: if statment Pin
sofia_1118-Jun-08 2:26
sofia_1118-Jun-08 2:26 
GeneralRe: if statment Pin
Chris Losinger8-Jun-08 4:24
professionalChris Losinger8-Jun-08 4:24 
GeneralRe: if statment Pin
sofia_1118-Jun-08 4:42
sofia_1118-Jun-08 4:42 
GeneralRe: if statment Pin
Jijo.Raj8-Jun-08 5:01
Jijo.Raj8-Jun-08 5:01 
AnswerRe: if statment Pin
sofia_1118-Jun-08 5:09
sofia_1118-Jun-08 5:09 
Questionerror in buttonclick Pin
Mohanraj D7-Jun-08 21:45
Mohanraj D7-Jun-08 21:45 
AnswerRe: error in buttonclick Pin
CPallini7-Jun-08 22:02
mveCPallini7-Jun-08 22:02 
AnswerRe: error in buttonclick Pin
sudhir_Kumar8-Jun-08 1:28
sudhir_Kumar8-Jun-08 1:28 
AnswerRe: error in buttonclick Pin
Hamid_RT8-Jun-08 2:02
Hamid_RT8-Jun-08 2:02 
AnswerRe: error in buttonclick Pin
Jijo.Raj8-Jun-08 3:42
Jijo.Raj8-Jun-08 3:42 
AnswerRe: error in buttonclick Pin
Nibu babu thomas8-Jun-08 17:19
Nibu babu thomas8-Jun-08 17:19 
Questionbutton click problem Pin
Mohanraj D7-Jun-08 20:25
Mohanraj D7-Jun-08 20:25 
AnswerRe: button click problem Pin
Hamid_RT7-Jun-08 21:07
Hamid_RT7-Jun-08 21:07 
GeneralRe: button click problem Pin
sudhir_Kumar8-Jun-08 1:30
sudhir_Kumar8-Jun-08 1:30 
GeneralRe: button click problem Pin
Hamid_RT8-Jun-08 2:00
Hamid_RT8-Jun-08 2:00 
AnswerRe: button click problem Pin
Nelek9-Jun-08 7:32
protectorNelek9-Jun-08 7:32 

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

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