192327/access-specifiers-should-inherit-private-protected-public
To begin answering that question, let me characterise member accessors in my own terms. If you already know this, proceed to the section "next:". I'm aware of three types of accessors: public, protected, and private. Let: class Base { public: ...READ MORE
A smart pointer is similar to a ...READ MORE
A copy constructor is a member function ...READ MORE
It is part of a series. Replace pow() with the previous iteration's value. There is no need for code to call pow (). Pow(x, 5 * I - 1) and pow(-1, I - 1) may be formed since both have an int exponent dependent on the iterator I from the previous loop iteration. Example: Let f(x, i) = pow(x, 5 * i ...READ MORE
I can make an array and initialise&nb ...READ MORE
In C++, how can I find the greatest or minimum value in a vector? Is it correct to assume that it would be similar with an array? Do I require an iterator? I tried max element, but I kept receiving errors. vector<int>::const_iterator it; it = max_element(cloud.begin(), cloud.end()); error: request for ...READ MORE
No, there is no generic base class&nb ...READ MORE
When and why should I use public, ...READ MORE
I'm learning C++, but I'm having trouble ...READ MORE
As an example: Shouldn't the second d.print() call during upcasting print "base"? Isn't it a "d" derived object that has been upcasted to a base class object? And what advantages does downcasting have? Could you describe upcast and downcast in more detail? #include <iostream> using namespace std; class Base { public: ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.