In c++ logic when we require square of a number then there are multiple solutions are available for it. You can use Power function of c++ pow(Base,Power)Simple multiplication of number two timeIf we want to make square without multiplication then we can achieve it using for loop or while loop. How to square a number in c++ ? Here we can square number using Power … [Read more...] about How to square a number in c++ ?
How to divide in c++ ?
In c++ there are different possible solutions for dividing two number or variable in decimal or floating values. Also in embedded domain many time bit-wise right shift operator also used. So if you are finding answer of How to divide in c++ then this is perfect article for you to learning different solutions. 1. How to divide in c++ decimal Here we can directly divide … [Read more...] about How to divide in c++ ?
How to convert int to string c++ ? [SOLVED]
Many time during implementing c++ logic or displaying string we require to convert int to string in c++. We have given different solution for c++ int to string conversion. Here we have provided solutions using std::to_string(), using std::ostringstream and using custom function to convert int to string in c++. 1) Int to string c++ ( Using std::to_string) Here … [Read more...] about How to convert int to string c++ ? [SOLVED]
No matching function for call to [SOLVED]
When we are calling some function but there is not matching function definition argument, then we get compilation error as No matching function for call to c++. To resolve this error, We need to pass appropriate matching argument during function call. Or need to create different overloaded function with different arguments. Check function calling and function definition … [Read more...] about No matching function for call to [SOLVED]
Undefined reference to main c++ [SOLVED]
As a beginner c++ developer , you probably might get error like undefined reference to `main'. Generally this error occurs when we forgot not define main() function in program. In any c++ program main() function is necessary to start a program. So whenever you create any class then do not forgot to add main function in your project and then you can call class functions from … [Read more...] about Undefined reference to main c++ [SOLVED]