Click here to Skip to main content
14,580,516 members

C / C++ / MFC

 
QuestionFile Explorer Properties Dialog - SOLVED Pin
Richard Andrew x6424-Apr-20 4:27
professionalRichard Andrew x6424-Apr-20 4:27 
QuestionOpenGL stencil not working... Pin
Vaclav_22-Apr-20 10:38
MemberVaclav_22-Apr-20 10:38 
AnswerRe: OpenGL stencil not working... Pin
leon de boer22-Apr-20 19:16
Memberleon de boer22-Apr-20 19:16 
GeneralRe: OpenGL stencil not working... Pin
Vaclav_23-Apr-20 3:10
MemberVaclav_23-Apr-20 3:10 
GeneralRe: OpenGL stencil not working... Pin
Vaclav_23-Apr-20 8:11
MemberVaclav_23-Apr-20 8:11 
QuestionCross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Hans99922-Apr-20 0:57
MemberHans99922-Apr-20 0:57 
AnswerRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Richard MacCutchan22-Apr-20 3:47
mveRichard MacCutchan22-Apr-20 3:47 
AnswerRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
k505422-Apr-20 4:07
mvek505422-Apr-20 4:07 
In C/C++ lines that start with # are preprocessor directives. What you need to understand about the preprocessor is what it basically does is text replacement. So what happens is that your C/C++ program text, lets call it program.cpp, gets passed through the preprocessor, and the output of that gets passed to the compiler proper.

So lets say you have
#define Circumference c
#define Foo 10

cout <<  Circumference << "  " << Foo << end;
When it gets to the compiler, it sees this:
cout << c << " " << 10
So the compiler proper never sees the #define statements.

The fine print:
The standards for C and C++ don't specify how the preprocessor is implemented, just how it should behave. Most compilers have chosen to implement the preprocessor as a separate executable, but it certainly doesn't have to be that way.

Keep Calm and Carry On

SuggestionRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
David Crow22-Apr-20 5:18
MemberDavid Crow22-Apr-20 5:18 
GeneralRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Richard MacCutchan22-Apr-20 6:25
mveRichard MacCutchan22-Apr-20 6:25 
GeneralRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
David Crow22-Apr-20 6:43
MemberDavid Crow22-Apr-20 6:43 
GeneralRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Richard MacCutchan22-Apr-20 6:51
mveRichard MacCutchan22-Apr-20 6:51 
Question'get_osfhandle': identifier not found Pin
_Flaviu20-Apr-20 0:13
Member_Flaviu20-Apr-20 0:13 
AnswerRe: 'get_osfhandle': identifier not found Pin
Richard MacCutchan20-Apr-20 0:37
mveRichard MacCutchan20-Apr-20 0:37 
GeneralRe: 'get_osfhandle': identifier not found Pin
leon de boer20-Apr-20 2:05
Memberleon de boer20-Apr-20 2:05 
GeneralRe: 'get_osfhandle': identifier not found Pin
Richard MacCutchan20-Apr-20 3:28
mveRichard MacCutchan20-Apr-20 3:28 
QuestionSOLVED Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 8:38
MemberVaclav_18-Apr-20 8:38 
AnswerRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 9:07
professionalGreg Utas18-Apr-20 9:07 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 9:22
MemberVaclav_18-Apr-20 9:22 
AnswerRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 10:24
professionalGreg Utas18-Apr-20 10:24 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 10:52
MemberVaclav_18-Apr-20 10:52 
GeneralRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 11:04
professionalGreg Utas18-Apr-20 11:04 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_19-Apr-20 5:47
MemberVaclav_19-Apr-20 5:47 
GeneralRe: Passing function with parameters as parameter Pin
Greg Utas19-Apr-20 6:05
professionalGreg Utas19-Apr-20 6:05 
GeneralSOLVED Re: Passing function with parameters as parameter Pin
Vaclav_19-Apr-20 9:03
MemberVaclav_19-Apr-20 9: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.