hello
what does "bitand" do in c++ code ?
what is that mean : (object_name bitand variable_name)
This is a discussion on what "bitand" do ??? within the C++ Programming forums, part of the General Programming Boards category; 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 &.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Thank You Laserlight,
what is that mean : (object_name bitand variable_name) ?
Oh, then you should read about bit shifting and bitwise operations.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
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
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
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.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
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 human mind treats a new idea the way the body treats a strange protein; it rejects it. - P.B.Medawar