Click here to Skip to main content
15,926,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disable a Dialog Button Pin
Best Friend19-Mar-04 5:42
Best Friend19-Mar-04 5:42 
GeneralRe: Disable a Dialog Button Pin
MeterMan22-Mar-04 16:29
MeterMan22-Mar-04 16:29 
GeneralDDEConnect stops and waits Pin
dzsigit19-Mar-04 4:23
dzsigit19-Mar-04 4:23 
GeneralShould be easy.. Pin
RobJones19-Mar-04 4:00
RobJones19-Mar-04 4:00 
GeneralRe: Should be easy.. Pin
jmkhael19-Mar-04 4:18
jmkhael19-Mar-04 4:18 
GeneralRe: Should be easy.. Pin
RobJones19-Mar-04 4:24
RobJones19-Mar-04 4:24 
GeneralRe: Should be easy.. Pin
rrrado19-Mar-04 4:54
rrrado19-Mar-04 4:54 
GeneralRe: Should be easy.. Pin
Navin19-Mar-04 6:36
Navin19-Mar-04 6:36 
I think there was a typo in the other post.

Anyway, mod it with 2 and you'll either get back 1 or 0. For instance:

1 % 2 = 1
2 % 2 = 0
3 % 2 = 1
... and so on. E.g.,
bool IsEven(int j)
{
  if(j % 2 == 1)
    return false;
  else
    return true;
}


This could certainly be optimised if high performance is needed... I just posted a simple version. Big Grin | :-D


Remember, even if you win the rat race, you're still a rat.
GeneralInserting data to exe file Pin
Chernobog119-Mar-04 3:52
Chernobog119-Mar-04 3:52 
GeneralRe: Inserting data to exe file Pin
Prakash Nadar19-Mar-04 5:59
Prakash Nadar19-Mar-04 5:59 
GeneralRe: Inserting data to exe file Pin
Chernobog119-Mar-04 7:00
Chernobog119-Mar-04 7:00 
GeneralRe: Inserting data to exe file Pin
Prakash Nadar19-Mar-04 15:06
Prakash Nadar19-Mar-04 15:06 
GeneralRe: Inserting data to exe file Pin
Navin19-Mar-04 6:38
Navin19-Mar-04 6:38 
QuestionHow to load bitmap ? Pin
rrrado19-Mar-04 3:31
rrrado19-Mar-04 3:31 
AnswerRe: How to load bitmap ? Pin
Antti Keskinen20-Mar-04 4:45
Antti Keskinen20-Mar-04 4:45 
GeneralRe: How to load bitmap ? Pin
rrrado21-Mar-04 21:05
rrrado21-Mar-04 21:05 
QuestionA Debugger Coded using MFC's?? Pin
Caoimh19-Mar-04 3:03
Caoimh19-Mar-04 3:03 
AnswerRe: A Debugger Coded using MFC's?? Pin
Michael Dunn19-Mar-04 4:24
sitebuilderMichael Dunn19-Mar-04 4:24 
GeneralRe: A Debugger Coded using MFC's?? Pin
Caoimh19-Mar-04 4:32
Caoimh19-Mar-04 4:32 
GeneralRe: A Debugger Coded using MFC's?? Pin
Prakash Nadar19-Mar-04 5:56
Prakash Nadar19-Mar-04 5:56 
QuestionHow to 'lock' some computer Pin
Frosty_Muad'Dib19-Mar-04 2:06
Frosty_Muad'Dib19-Mar-04 2:06 
AnswerRe: How to 'lock' some computer Pin
Alexander M.,19-Mar-04 2:36
Alexander M.,19-Mar-04 2:36 
AnswerRe: How to 'lock' some computer Pin
David Crow19-Mar-04 2:38
David Crow19-Mar-04 2:38 
General Problem with reading from Socket using CArchive::Read() Pin
s_k19-Mar-04 2:05
s_k19-Mar-04 2:05 
Generalis there a max. length of a array in c++ Pin
ben_tros19-Mar-04 2:03
ben_tros19-Mar-04 2:03 

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.