this my first c++ project by using classes and i face this problem error C3867
my main
code is
#include <string>
#include <iostream>
#include "Car.h"
int main() {
Car c1;
c1.setMaker("Honda");
c1.setModel(2018);
cout << "This Car Made By" << c1.getMaker << "\n";
cout << "This Car Model" << c1.getModel << "\n";
}
the header is
#pragma once
#include <string>
using namespace std;
class Car {
private:
string maker;
int model;
public:
void setMaker(string m);
string getMaker();
void setModel(int m);
int getModel();
the cpp is
#include "Car.h"
void Car::setMaker(string l) { maker = l; }
string Car::getMaker() { return maker; }
void Car::setModel(int m) { model = m; }
int Car::getModel() { return model; }
and this is the error message:
error C3867: 'Car::getMaker': non-standard syntax; use '&' to create a pointer to member
i've tried everything i know as a beginner but i can't make it work :(