string does not name a type?

So I've made some classes, and during compilation, I get the error that string does not name a type on line 14.
Any help is appreciated...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef SIMPLE_LOAN_H
#define SIMPLE_LOAN_H
#include<string>
#include "loan.h"

class simple : public loan
{
	private:
		std::string type;
	
	public:
		simple();
		double monthly_payment();
		std::string get_type() {return type;}
};

#endif 


{return type;}

I'm not sure what this is doing here?
I'm not sure what this is doing here?

I don't see anything wrong with it. The OP is simply putting the definition of the method inline in the class definition, rather than in a separate cpp file.
Topic archived. No new replies allowed.