c++ - Why should we use "::" operator on global functions / objects? -


i have seen used in various places. c++ programmers use :: operator right before global function call.

e.g

::glgenbuffers( 1, &id ); 

why this? why not use:

glgenbuffers( 1, &id ); 

to avoid accidental namespace clashing. example if current namespace have glgenbuffers different "good" glgenbuffers :: can specify call glgenbuffers in global namespace.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -