Hi, I am looking to use a vector to store objects of another class, however the borland compiler keeps telling me type name expected and declaration missing.
Code:
#ifndef RecipeH
#define RecipeH
#include <vector>
#include "Ingredients.h"
//---------------------------------------------------------------------------
class Recipe
{
private:
AnsiString RecipeName;
AnsiString RecipeDesciption;
double Time;
vector<Ingredients> IngredientsUsed;
public:
Recipe();
~Recipe();
void setRecipe(AnsiString aRecipeName,AnsiString aRecipeDescription,
double aTime);
};
is there anything wrong with this code?
Also I am getting a whole load of errors with this code:
Code:
class Ingredients
{
protected:
AnsiString IngredientName;
AnsiString IngredientDescription;
int Amount;
public:
Ingredients();
~Ingredients();
void setIngredients(AnsiString aIngredientName,
AnsiString aIngredientDrescription,int aAmount);
AnsiString getIngredientName();
AnsiString getIngredientDescription();
int getAmount();
};
this is the errors i get:
http://aamericandream.net/errors.GIF