I have a Seat Class and I'm trying to get my main file to access the Seat class and it's not working. Here is my code:
My seat class:
#include<iostream>
#include<iomanip>
#include<string>
class Seat{
public:
char name;
bool available;
Seat(char name, bool available){
this.name=name;
this.available = available;
}
Seat(){
name="A1";
avaible = false;
}
void setName(char name){
this.name=name;
}
char getName(){
return name;
}
}
And my main class
#include<iostream>
#include<iomanip>
#include<string>
#include<Seat>
using namespace std;
Seat A1 = new Seat("A1", true);
string input;
void main(){
cout<<A1.getName() <<endl;
}