c++ - What does :: mean after declaring an object? -


i trying hello world stuff after completing the standard c++ tutorial. first thing tried doing drawing directly on screen without window. found this , works.

#include "stdafx.h" #include <windows.h> #include <iostream> using namespace std;  int _tmain(int argc, _tchar* argv[]) {     hdc screendc = ::getdc(0);     ::rectangle(screendc, 200, 200, 300, 300);      int exit; cin >> exit;     return 0; } 

enter image description here

but in standard c++ tutorial cover this

hdc screendc = ::getdc(0); ::rectangle(screendc, 800, 200, 300, 300); 

what rectangle member of?


if don't mind have other questions might simple. if not don't worry it.

:: accesses global namespace. namespace resolution. can drop :: if like, cruff.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -