Click here to Skip to main content
15,905,414 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Beginner's Question Pin
Richard MacCutchan11-Sep-09 1:32
mveRichard MacCutchan11-Sep-09 1:32 
GeneralRe: Beginner's Question [modified] Pin
UKM_Student11-Sep-09 2:00
UKM_Student11-Sep-09 2:00 
GeneralRe: Beginner's Question Pin
Adam Roderick J11-Sep-09 2:32
Adam Roderick J11-Sep-09 2:32 
QuestionRe: Beginner's Question Pin
CPallini11-Sep-09 2:09
mveCPallini11-Sep-09 2:09 
AnswerRe: Beginner's Question Pin
UKM_Student11-Sep-09 2:12
UKM_Student11-Sep-09 2:12 
GeneralRe: Beginner's Question Pin
CPallini11-Sep-09 2:32
mveCPallini11-Sep-09 2:32 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 2:41
UKM_Student11-Sep-09 2:41 
GeneralRe: Beginner's Question Pin
CPallini11-Sep-09 2:51
mveCPallini11-Sep-09 2:51 
UKM_Student wrote:
if (k % 2 == 1) k++;???


if k is odd (an odd number modulus 2 gives 1) then increment k (i.e. k=k+1) to make it even.
(Just in case firstNum is odd).

UKM_Student wrote:
And i thought that "if statement" needs to be paired with an "else"?

Actually the else clause is optional in the if statement, see, for instance, here.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 2:59
UKM_Student11-Sep-09 2:59 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 3:04
UKM_Student11-Sep-09 3:04 
GeneralRe: Beginner's Question Pin
CPallini11-Sep-09 3:15
mveCPallini11-Sep-09 3:15 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 3:17
UKM_Student11-Sep-09 3:17 
GeneralRe: Beginner's Question Pin
CPallini11-Sep-09 3:34
mveCPallini11-Sep-09 3:34 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 3:37
UKM_Student11-Sep-09 3:37 
GeneralRe: Beginner's Question Pin
David Crow11-Sep-09 3:20
David Crow11-Sep-09 3:20 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 3:31
UKM_Student11-Sep-09 3:31 
GeneralRe: Beginner's Question Pin
Richard MacCutchan11-Sep-09 3:25
mveRichard MacCutchan11-Sep-09 3:25 
GeneralRe: Beginner's Question Pin
CPallini11-Sep-09 3:14
mveCPallini11-Sep-09 3:14 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 3:19
UKM_Student11-Sep-09 3:19 
GeneralRe: Beginner's Question Pin
UKM_Student11-Sep-09 3:32
UKM_Student11-Sep-09 3:32 
QuestionDetecting identical path names Pin
Mattias G11-Sep-09 1:08
Mattias G11-Sep-09 1:08 
AnswerRe: Detecting identical path names Pin
Randor 11-Sep-09 1:30
professional Randor 11-Sep-09 1:30 
GeneralRe: Detecting identical path names Pin
Mattias G11-Sep-09 1:36
Mattias G11-Sep-09 1:36 
GeneralRe: Detecting identical path names Pin
Randor 11-Sep-09 1:40
professional Randor 11-Sep-09 1:40 
GeneralRe: Detecting identical path names [modified] Pin
Mattias G11-Sep-09 2:07
Mattias G11-Sep-09 2:07 

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.