Category : xcode

Problem While running command: $ mkdir build $ cd build/ $ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. $ cmake –build . –config Debug This error is thrown: error: overload resolution selected deleted operator ‘=’ At this statement: PolyTree(PolyTree &&src) { *this = std::move(src); } ~~~~~ ^ ~~~~~~~~~~~~~~ Source code Library source code consists of a few files available ..

Read more

Whenever I run my code, it returns NaN. double a = -0.5; double b = 0; double c = 601; cout << (-1*b+sqrt(b*b-4*a*(c-615)))/(2*a) << endl; I can see by using breakpoints that the value is calculated to be: 6.9531301383805707E-310, but it still returns NaN. Does anyone know what’s wrong? Source: Windows Que..

Read more

I have a problem with Xcode not showing program after a successful build. Searched for some answers online and I was advised to update and I did. But the problem is still there. Here is the code I was running. // Dog to Human age calculator #include <iostream> #include <cmath> using namespace std; int calcDogAge ..

Read more

I need help please! I can’t see what is wrong with my code. in this function: using B = std::map<std::string, int>; void read(const B& m, const std::string& file_name) I have this pair p: std::pair<std::string, int> p; that is used to get the name (first element) and its number (second element) from a file if (!file_name.empty()) ..

Read more