Category : if-statement

So basically I got the following assignment: Returns the number of open timeslots in the given list of appointments. Given appointments [9:30-10:00, 12:00-13:00, 15:15-16:30] the result should be 4 [8:00-9:30, 10:00-12:00, 13:00-15:15, 16:30-17:00]. name="appointments">The list of current appointments The number of open timeslots in the given list of appointments What is the best way to ..

Read more

I’m really new to C++ I’m trying to do a comparison from a curl request but my problem is that my program always print the body and doesn’t enter in the if statement I already searched but since I’m new to C++ I don’t know what I must search exactly #define CURL_STATICLIB #include <iostream> #include ..

Read more

My question would be how would I do a nested curl request because my current code is this and does not work. I does not work as I can see the requests going to my server and there is only one which is a GET request. #include <curl/curl.h> #include <iostream> int rad = rand() % ..

Read more

To check if a vector has all equal values i usually do this: std::vector<bool> myVec(3); if(std::adjacent_find(myVec.begin(), myVec.end(), std::not_equal_to<>()) == myVec.end()){ // do if every value is the same } How can i use it to check if a vector of vectors has all equal values? This would be the case: std::vector<std::vector<bool>> my2DVec(3, std::vector<bool>(3)); Source: Windows ..

Read more