User talk:

From Rosetta Code
Revision as of 14:07, 6 August 2010 by (talk) (^ in C++/CLI is used to declare CLI object pointers; ^ still doubles as bitwise xor (not bitwise not))

Hey there. My biggest confusion regarding the C++/CLI example was the syntax I saw using the ^ operator. It looked like bitwise-not was being applied in an syntactically-incorrect fashion. I take it ^ isn't bitwise-not in C++/CLI? --Michael Mol 13:26, 6 August 2010 (UTC)

The ^ operator was never used for bitwise not in C or C++ (the bitwise not operator is ~). The binary ^ is xor, and remains to have that function in C++/CLI. However in C++/CLI, ^ can also be used in declarations to define a CLI object pointer (i.e. a pointer to a "managed" object). This is quite similar to the double use of * to mean both multiplication (2*5) and declaration of pointer (int* p), except that * can in addition be used as unary dereference operator (*p), which I don't think is possible with ^. -- 14:07, 6 August 2010 (UTC)

This is the discussion page for an anonymous user who has not created an account yet, or who does not use it. We therefore have to use the numerical IP address to identify them. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please create an account or log in to avoid future confusion with other anonymous users.