0

I am making a coffee menu program that uses classes and derived classes to classify mocha drinks. For some reason despite me initializing all variables and there being no error messages every time I create an object from any of the classses Visual Studio wont run my code saying that the system cannot find the specified file. Here is an example of one of my derived classes:

class DarkChocolateMocha : public Mocha{
private:
    int milkAmmount;
    int espressoShot;
    string chocolateType = "Dark Chocolate";

public:

    DarkChocolateMocha();

    DarkChocolateMocha(int milk, int shot) {

        this->milkAmmount = milk;

        this->espressoShot = shot;

    }

    void prepare() {
        cout << "White Cholcolate Mocha. Ingrediants:\n-" << milkAmmount << "\n-" << espressoShot << 

"\n-" << chocolateType;
        }
    };
  • There's nothing obviously wrong with the shown code. Your description of your problem points to installation problem, a configuration problem, or some kind of an internal failure with your compiler and/or computer. Basically, nothing that anyone on stackoverflow.com could possibly help with, from the looks of it, unfortunately. – Sam Varshavchik Jun 15 '20 at 02:49

1 Answers1

0

Sorry, Your question is not explaining the exact problem and even by looking at your code also it's not clear. There may be a chance that you have defined your child class before the parent class or maybe you are using the wrong env while building your program. For the problem "the system cannot find the specified file" refer this