Question: Learning C++ here. So I have written: #include #include #include using namespace std; class BMI { private: double weight; int height; string name; public: BMI()
Learning C++ here.
So I have written:
#include
using namespace std;
class BMI { private: double weight; int height; string name; public: BMI() {} BMI(string name, double weight, int height) { this->weight = weight; this->height = height; this->name = name; } void setWeight(double weight) { this->weight = weight; } double getWeight() const { return weight; } void setHeight(int height) { this->height = height; } int getHeight() const { return height; } void setName(string name) { this->name = name; } string getName() const { return name; } };
void fillVector(vector
int main() { vector
void fillVector(vector
void printVector(const vector
I can enter stuff in but It would not print the values i put in.
Let me know what i did wrong. please help.
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
