| | |
quick synax question
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
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 beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






