1 error and dont know why header inclusion?

#include <string>

using namespace std;

#ifndef _Automobile
#define _Automobile
class Automobile
{
private:
string vin; // first name
string make; // last name
string model; // subject of the paper
string color; // assigned letter grade



public:
Automobile( );
void setVin(string v);
void setMake(string ma);
void setModel(string mod);
void setColor(string c);
string getVin( );
string getMake( );
string getModel( );
string getColor( );
void displayAutomobile();

};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#endif
#include <cstdlib>
#include <iostream>
#include "Automobile.h"   //// This is giving me a error and i dont know why..

using namespace std;



Automobile::Automobile( )
{
   vin=""; // Vehicle Identification
   make=""; // Make
   model=""; // Model
   color=""; // Color
}
void Automobile::setVin(string v)
{
   vin = v;
}
void Automobile::setMake(string ma)
{
  make = ma;
}
void Automobile::setModel(string mod)
{
  model = mod;
}
void Automobile::setColor(string c)
{
  color = c;
}
string  Automobile::getVin( )
{
  return vin;
}
string Automobile::getMake( )
{
  return make;
}
string Automobile::getModel( )
{
  return model;
}
string Automobile::getColor( )
{
  return color;
}

void Automobile::displayAutomobile()
{
	cout << "Vehicle Identification Number: " << vin << endl 
		<< "Make: " << make << endl
		<< "Model: " << model << endl
		<< "Color: " << color << endl;
}

> This is giving me a error
Insufficient data for meaningful answer.
Sorry the top part is part of the source code also the top is a txt file or a .h titled automobile.h and it doesn't work the file is in same folder its still giving me a hard time
What exactly is the compiler telling you?
Also, what compiler are you using? For example, if you use Code::Blocks, you have to both "add" the file to the project (right-click on project name on the left) and make sure the files on in the correct directory(folder).
I runs fine for me
closed account (DEUX92yv)
Holding you explicitly to what you've said: #include "Automobile.h"
While in your post just above, you say it's titled automobile.h

C++ is case sensitive.
Topic archived. No new replies allowed.