Garmaine Staff asked 1 year ago

I try to compile this c++ program but i get this error:

"main.cpp:17: undefined reference to `Burrito::Burrito()' collect2: error: ld returned 1 exit status The terminal process terminated with exit code: 1"

What it should do, is printing: "Goodmorning". I really don't know what i am doing wrong but hope you guy can help me.

The main.cpp:

#include <iostream>
#include "Burrito.h"

using namespace std;


int main()
{
    Burrito bo;
    return 0;
}

The Burrito.h:

#ifndef BURRITO_H
#define BURRITO_H

class Burrito
{
    public:
        Burrito();
};

#endif

And the Burrito.cpp:

#include <iostream>
#include "Burrito.h"


using namespace std;

Burrito::Burrito()
{
    cout << "Goodmorning" << endl;

}