Click here to Skip to main content
15,566,520 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need Source Code for Decoding _Using algorithm Pin
Member 1326117521-Jun-17 3:16
Member 1326117521-Jun-17 3:16 
GeneralRe: Need Source Code for Decoding _Using algorithm Pin
Pete O'Hanlon21-Jun-17 3:27
mvaPete O'Hanlon21-Jun-17 3:27 
GeneralRe: Need Source Code for Decoding _Using algorithm Pin
leon de boer21-Jun-17 4:11
leon de boer21-Jun-17 4:11 
GeneralRe: Need Source Code for Decoding _Using algorithm Pin
Member 1326117521-Jun-17 19:17
Member 1326117521-Jun-17 19:17 
GeneralRe: Need Source Code for Decoding _Using algorithm Pin
Member 1326117522-Jun-17 3:00
Member 1326117522-Jun-17 3:00 
GeneralRe: Need Source Code for Decoding _Using algorithm Pin
leon de boer22-Jun-17 11:31
leon de boer22-Jun-17 11:31 
QuestionLocal / unique Variable Macro question Pin
ForNow18-Jun-17 9:44
ForNow18-Jun-17 9:44 
AnswerRe: Local / unique Variable Macro question Pin
Iain Clarke, Warrior Programmer18-Jun-17 21:36
Iain Clarke, Warrior Programmer18-Jun-17 21:36 
If I understand you, then yes - a variable declared inside {}'s is local to that block of code (or "scope").

So, you could do something like:

#define DOALOOP(x) { for (int i = 0; i < X; i++) { DoSomething (i); } }

and you would not mess up any other "i"s there. This is called shadowing, and can be powerful... Or causes confusion if you do it by accident!
I am one of "those foreigners coming over here and stealing our jobs". Yay me!

SuggestionRe: Local / unique Variable Macro question Pin
Jochen Arndt18-Jun-17 22:42
professionalJochen Arndt18-Jun-17 22:42 
AnswerRe: Local / unique Variable Macro question Pin
leon de boer19-Jun-17 4:40
leon de boer19-Jun-17 4:40 
GeneralRe: Local / unique Variable Macro question Pin
ForNow19-Jun-17 4:55
ForNow19-Jun-17 4:55 
GeneralRe: Local / unique Variable Macro question Pin
leon de boer19-Jun-17 6:14
leon de boer19-Jun-17 6:14 
GeneralRe: Local / unique Variable Macro question Pin
ForNow19-Jun-17 6:52
ForNow19-Jun-17 6:52 
GeneralRe: Local / unique Variable Macro question Pin
leon de boer19-Jun-17 10:16
leon de boer19-Jun-17 10:16 
AnswerRe: Local / unique Variable Macro question Pin
Bram van Kampen28-Jun-17 14:21
Bram van Kampen28-Jun-17 14:21 
GeneralRe: Local / unique Variable Macro question Pin
ForNow28-Jun-17 14:47
ForNow28-Jun-17 14:47 
GeneralRe: Local / unique Variable Macro question Pin
Bram van Kampen28-Jun-17 15:21
Bram van Kampen28-Jun-17 15:21 
QuestionDisecting a PE File Pin
Bram van Kampen16-Jun-17 15:19
Bram van Kampen16-Jun-17 15:19 
AnswerRe: Disecting a PE File Pin
leon de boer17-Jun-17 4:17
leon de boer17-Jun-17 4:17 
GeneralRe: Disecting a PE File Pin
Bram van Kampen18-Jun-17 13:46
Bram van Kampen18-Jun-17 13:46 
GeneralRe: Disecting a PE File Pin
harold aptroot18-Jun-17 4:11
harold aptroot18-Jun-17 4:11 
GeneralRe: Disecting a PE File Pin
Bram van Kampen18-Jun-17 14:05
Bram van Kampen18-Jun-17 14:05 
GeneralRe: Disecting a PE File Pin
harold aptroot18-Jun-17 14:39
harold aptroot18-Jun-17 14:39 
GeneralRe: Disecting a PE File Pin
Bram van Kampen19-Jun-17 14:27
Bram van Kampen19-Jun-17 14:27 
GeneralRe: Disecting a PE File Pin
harold aptroot19-Jun-17 15:27
harold aptroot19-Jun-17 15:27 

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.