I'm having trouble overloading the + operator in C ++. Anyone have any idea what's wrong?
To perform the unit tests I'm using googletest in Ubuntu.
(I wanted to do this to make the code cleaner)
Code:
---- vector.cpp -----
vector<d...
I need to know if the sum of two numbers is a perfect square,
I thought of adding the two and taking the root and then checking if the rest of the division by 1 is greater than zero, except that the operator (%) only works with integers and sqrt...
I'm a beginner so there may be things wrong here.
I need to do thousands of calculations with data (decimal numbers float) of several giant csv files, so I figured that using the binary in the ieee754 standard would avoid conversion and this...
Hello, I would like to know how Strings compare to C with the "==" operator.
I program in Java, and to compare Strings, we use the "equals"
Example "myAttribute.equals (" Text to be compared ")"
In C language, can I use the "=="? When can I us...
I'm studying Kotlin. I noticed that, in the conversion to type int , it is necessary to put the double exclamation ( !! ).
Example:
var input = readLine()!!.toInt();
Generally in other languages double exclamation is used to...
I've seen some code in C / C ++ statements like this:
volatile int i = 0;
I would like to know what the volatile operator is and in what cases I should use it.
I've seen some uses of ... but I'm not sure what it's like. Example:
var a = [1, 2, 3];
var b = [4, 5, ...a];
How do you call this operator and how does it work?
I've seen some uses of ... but I'm not sure what it's like. Example:
var a = [1, 2, 3];
var b = [4, 5, ...a];
How do you call this operator and how does it work?