hello
what does "bitand" do in c++ code ?
what is that mean : (object_name bitand variable_name)
hello
what does "bitand" do in c++ code ?
what is that mean : (object_name bitand variable_name)
bitand means &
Just another name, so unless you need it, you might as well use &.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thank You Laserlight,
what is that mean : (object_name bitand variable_name) ?
Oh, then you should read about bit shifting and bitwise operations.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
What is that mean :
class_name bitand operator = (const class_name bitant)
Thanks laserlight
But an object is not a variable ! . it is not possible to do bit wise with an object .
Do you have any special reason to use bitand instead of & when I already recommended just using &? Are you learning C++ through a book or something? If so, which book?Originally Posted by codewriter
The term "object" can include objects of built-in types like int. But you probably have objects of class type in mind, in which case there is operator overloading.Originally Posted by codewriter
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
This a part of the code :
bool DrawRect(const TRect bitand SrcRect, int x, int y)
TRect is a name of a class
Please answer my questions.
The problem is that this should be a fairly easy question to answer, as long as you have had a proper introduction to C++. Otherwise, my answer will be meaningless to you except as an answer to a trivia question.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
If bitand is exactly the same as & (whether meaning bitwise-and, address-of or reference) then
is just a really stupid way of sayingCode:class_name bitand operator = (const class_name bitand)
Code:class_name& operator=(const class_name&)
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss