I am currently trying to learn the basic C++ with Accelerated C++. I tried to create my own solution for the ex. 5.1 in the book but the program got kind a complicated and I was not able to find a solution to errors that I got when I compiled it. If someone can help ..
I tried to compile "grade.cpp" separately, but the terminal returns "Undefined symbols for architecture x86_64"; How to solve this question such that I can compile "grade.cpp" separately? The terminal looks like this (my name is starred): (base) ***************-MacBook-Pro ch4 % g++ grade.cpp Undefined symbols for architecture x86_64: "median(std::__1::vector<double, std::__1::allocator<double> >)", referenced from: grade(double, double, std::__1::vector<double, ..
I am trying to compute the lower quartile, median and upper quartile of a sorted STL vector of size n. One could achieve this by identifying the correct formulae for the quartiles for the 4 cases when n is (1) singly even, (2) doubly even, (3) ‘singly odd’ or (4) ‘doubly odd’ and using a ..