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; }
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.
as rectangle has window move on it, disappears. there callback let me know can repaint?
how change color of rectangle?
where can go learn this? every tutorial have found has been sparse , have been out of date. can book if that's need do. have tried following (sometimes success , not):
http://msdn.microsoft.com/en-us/library/vstudio/bb384843.aspx
http://msdn.microsoft.com/en-us/library/ms533895(v=vs.85).aspx
::
accesses global namespace. namespace resolution. can drop ::
if like, cruff.
Comments
Post a Comment