Error trying to use classes!

This is the main:
1
2
3
4
5
6
7
8
9
10
  #include <iostream>
#include "Fructe.h"

using namespace std;

int main()
{
    Fructe banana;
    return 0;
}

This is the header:
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef FRUCTE_H
#define FRUCTE_H


class Fructe
{
    public:
        Fructe();
};

#endif // FRUCTE_H

This is the source:
1
2
3
4
5
6
7
8
9
#include "Fructe.h"
#include <iostream>

using namespace std;

Fructe::Fructe()
{
    cout<<"I am the Fructe Constructor!"<<endl;
}


Yes, all are in the same folder: https://gyazo.com/7c8e916953a5f4cff43be4019ee9a7d3
There is nothing wrong with your code. What error message do you get?
Did you add fructe.cpp to the project ?
Putting it in the same location is not enough, unlike the header files.
Ohh, sorry, I forgot about the error :D

https://gyazo.com/6921851c99921feb88791fa8776e357a

("No such file or directory")
Topic archived. No new replies allowed.