| | |
quick synax question
![]() |
•
•
Join Date: Sep 2008
Posts: 30
Reputation:
Solved Threads: 0
Ok so im still learning C++, looking at some directx and i come across a _ before a var and was wondering what it means.
for example:
pDevice->SetVertexDeclaration( _vertexDeclaration );
or in a error macro:
SHOWERROR( “CreateVertexBuffer failed.”, __FILE__, __LINE__ );
first one is probably the best example.
thanks.
for example:
pDevice->SetVertexDeclaration( _vertexDeclaration );
or in a error macro:
SHOWERROR( “CreateVertexBuffer failed.”, __FILE__, __LINE__ );
first one is probably the best example.
thanks.
1. It's absolutely clear and ordinar member function call via a pointer to the object (with single argument).
2. Again it's not a syntax related question, syntactically it's a very simple construct. There are two standard macros in C and C++:
__FILE__ - expands to the current source module name (as a string literal)
__LINE__ - expands in the current source module line number (as a decimal constant).
Of course, you must have a minimal knowledge of C++ language to read sources
2. Again it's not a syntax related question, syntactically it's a very simple construct. There are two standard macros in C and C++:
__FILE__ - expands to the current source module name (as a string literal)
__LINE__ - expands in the current source module line number (as a decimal constant).
Of course, you must have a minimal knowledge of C++ language to read sources
Last edited by ArkM; Jan 2nd, 2009 at 7:43 am.
•
•
•
•
Originally Posted by c0x draft
17.6.4.3.3 Global names [global.names]
1 Certain sets of names and function signatures are always reserved to the implementation:
— Each name that contains a double underscore _ _ or begins with an underscore followed by an uppercase
letter (2.11) is reserved to the implementation for any use.
— Each name that begins with an underscore is reserved to the implementation for use as a name in the
global namespace.176
![]() |
Other Threads in the C++ Forum
- Previous Thread: sorting characters in a string... help!!!!
- Next Thread: problem in strtok
| Thread Tools | Search this Thread |
api array based binary bitmap business c++ c/c++ char class classes code coding commentinghelp compile console conversion count decide delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error faq file forms fstream function functions game givemetehcodez graph gui hash homeworkhelp homeworkhelper iamthwee ifpug ifstream infinite input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem proficiency program programming project python random read recursion reference rpg string strings temperature template templates test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






