Unable to start the program visual studio 2022

  Kiến thức lập trình
[header file](https://i.sstatic.net/pBAANwMf.png)
#include <cstdio>


class drink {
public:
    void step1();
    virtual void step2() = 0;
    void step3();
    virtual void step4() = 0;
};

class coffee : public drink {
public:
    void step2();
    void step4();
};

class tea : public drink {
public:
    void step2();
    void step4();
};
[class file](https://i.sstatic.net/fjTMeB6t.png)
#include <stdio.h>
class drink {

public:
    void step1() {
        printf("boil water");
    }
    virtual void step2() = 0;

    void step3() {
            printf("Pour into the cup");
    }

    virtual void step4() = 0;
};

class coffee : public drink {

public:

    void step2() {
        printf("Get coffee");
    }
    void step4() {
        printf("Put sugar");
    }
};

class tea : public drink {

public:
    void step2() {
        printf("Get tea");
    }
    void step4() {
        printf("put lemon");
    }
};
[main file](https://i.sstatic.net/vnpztjo7.png)
#include<stdio.h>

#include "Header.h"



int main() {

    coffee coffeee;
    coffeee.step1();




    return 0;
}

When I run the file it shows me unable to start the program, can’t find the file. When I ignore the header file and put my class file and main file together, I can run the program. The way I create the file is just right clicking the project and choose Add, so I think my path is right. And I can also see all file in my project folder. does anyone know how to solve it? It confused me a lot.

I dont know how to solve it

New contributor

contajsk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT