How to typedef a template class?

Hi

I am writing my first template class. Could you tell me what's wrong with my code here? I get this error, for line 9 of Basket.h :

error C2143: syntax error : missing ';' before '<'

Fruit.h
1
2
3
4
5
6
7
8
9
#include <iostream>
using namespace std;

template <class T>
class Fruit
{
public:
	T quantity;
};


Basket.h
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
using namespace std;

#include "Fruite.h"


class Basket
{
	typedef Fruite<int> FruiteType ;

	FruiteType apple ;
};



Thanks a lot
Last edited on
Fruit and Fruite are not the same :P
:D

Thanks a lot dude. I didn't expect that!! It seems I should improve my English instead of C++!!!
Topic archived. No new replies allowed.