Jump to content

What is an example of a binary operator that may not be overloaded in c++ ?

What is an example of a binary operator that may not be overloaded in c++ ? 

Link to comment
Share on other sites

Link to post
Share on other sites

64 >> 4 = 4

64 2^-4 = 4

 

64 << 4 = 1024

64 * 2^4 = 1024

 

Those are some binary operations in Java

Link to comment
Share on other sites

Link to post
Share on other sites

I wanna say Dot Operator and Pointer to member Operator, but I'm not 100% sure. Around like 92% sure lol

* [pointer] is a unary operator. (So is & [reference]). See: https://en.wikipedia.org/wiki/Unary_operation

 

By dot operator are your referring to like "class.field"? I'm not sure that is considered an operator, and I don't think it can be overridden. I don't even know what it's called, other than qualifying operator (e.g., to say that something is fully qualified).

 

You could take a look at scope resolution "::"

Link to comment
Share on other sites

Link to post
Share on other sites

Ah ok. I was referring the '.' operator in general. (I'm just learning this now so I'm a noob) lol

I don't program in C/C++ very often, so I was trying to think back on what the dot operator was.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×