View Full Version : Square function
^NyAw^
12th February 2007, 17:11
Hi,
Is there any Qt function to get the square of an integer? I'm not able to find it.
Thanks,
jacek
12th February 2007, 17:19
Is there any Qt function to get the square of an integer? I'm not able to find it.
No there isn't one, because you can write one yourself in a few seconds.
^NyAw^
12th February 2007, 17:22
Hi,
Ok, thanks. I will use the functions that are avaiable in the standard mathematic functions in "math.h".
Thanks,
Gopala Krishna
12th February 2007, 17:32
Hi,
Ok, thanks. I will use the functions that are avaiable in the standard mathematic functions in "math.h".
Thanks,
Use <cmath> since all methods are enclosed in std namespace. "math.h" is C header file not c++. :)
^NyAw^
12th February 2007, 17:39
Hi,
"math.h" is C header file not c++
I know. "math.h" is the header file. I don't said anytime that it is c++. What do you understand with that is not c++ ?
I only want the function that returns me the square of a number and it doesn't matter if ther is a class that resolves it or is a function. So I could use sqrt function including math.h or using the std namespace that will call the same function.
Thanks for the reply
Gopala Krishna
12th February 2007, 17:51
Hi,
I know. "math.h" is the header file. I don't said anytime that it is c++. What do you understand with that is not c++ ?
I only want the function that returns me the square of a number and it doesn't matter if ther is a class that resolves it or is a function. So I could use sqrt function including math.h or using the std namespace that will call the same function.
Thanks for the reply
Yep, anything will do as long it solves problem. I guess I am too much into c++ ;)
Sorry for the "offtopic" answer.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.