Top "Operators" questions

Lua script throws error "attempt to call a nil value (field 'deposit')"

I have this Lua script, which is supposed to create a new class, create an instance and call functions, but …

oop lua scripting operators colon
~= operator in Swift

I recently downloaded the Advanced NSOperations sample app from Apple and found this code... // Operators to use in the switch …

ios swift operators
Declaring function objects for comparison?

I have seen other people questions but found none that applied to what I'm trying to achieve here. I'm trying …

c++ operators operator-keyword function-object
increment map<string, int> using ++ operator

I have a map to count the occurrence of words in a file. I am reading words from the file, …

c++ map operators
How to raise a number to a power?

I was trying to raise an integer to a power using the caret operator (^), but I am getting surprising results, …

rust operators exponentiation
What is C# exclusive or `^` usage?

Can anyone explain this operator with a good example? I know what this operator is. I mean a real-life example.

c# operators bitwise-operators bitwise-xor
Why does JavaScript handle the plus and minus operators between strings and numbers differently?

I don't understand why JavaScript works this way. console.log("1" + 1); console.log("1" - 1); The first line prints 11, and the second …

javascript string numbers operators
What are the Pointer-to-Member ->* and .* Operators in C++?

Yes, I've seen this question and this FAQ, but I still don't understand what ->* and .* mean in C++. …

c++ operators pointer-to-member operator-arrow-star
When to use Shift operators << >> in C#?

I was studying shift operators in C#, trying to find out when to use them in my code. I found …

c# operators bit-shift
Is the ^ operator really the XOR operator in C#?

I read that the ^ operator is the logical XOR operator in C#, but I also thought it was the "power …

c# operators xor