Strange Issues with code

Basically, when I try to compile my program, I get these 4 errors (line 67 is marked in the code)

~\projects\meals decider\meals decider\Meal.h(67): error C2327: 'Meal::speed' : is not a type name, static, or enumerator
~\projects\meals decider\meals decider\Meal.h(67): error C2039: 'speed' : is not a member of 'std'
~\projects\meals decider\meals decider\Meal.h(67): error C2039: 'speed' : is not a member of 'std'
~\projects\meals decider\meals decider\Meal.h(67): error C2061: syntax error : identifier 'speed'

As far as I can tell, there is no reason for these errors. I say this becuase there no 'speed' variable in line 67, and also this variable is defined in the exact same way as several others and yet this is the only variable that gives these errors....

1
2
3
4
5
6
7
8
9
10
11
12
std::string name;
int tokens;
std::string base;
std::string speed;
std::string weight;
/*line67*/Meal(std::string nameIn, int tokenIn, std::string baseIn, std::string speedIn, std::speed weightIn){
	name = nameIn;
	tokens = tokenIn;
	base = baseIn;
	speed = speedIn;
        weight = weightIn;
}


Hope someone can help!
Last edited on
Meal(std::string nameIn, int tokenIn, std::string baseIn, std::string speedIn, std::speed weightIn)
Haha, thanks! I must have looked at that line of code over a hundred times and didnt see that!
Topic archived. No new replies allowed.