0

I am getting this error message
error: expected primary-expression before 'enum'
I can't figure it out.

#ifndef ROCK_H
#define ROCK_H
enum RockName {BASALT, DOLOMITE, GRANITE, GYPSUM, LIMESTONE, MARBLE, OBSIDIAN,
	QUARZITE, SANDSTONE, SHALE, ROCK_OVERFLOW};

class Rock
{
	public:
	Rock()
	{myName = BASALT;}
	Rock(enum RockName)
	{myName= RockName;}//here is where I am getting the error


	private:
	RockName myName;
};
#endif
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by firstPerson
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.