Trying to initialize and set things up for a class as follows:
class Accel
{
public:
Accel(const struct &F, const struct &m, const struct &M, const struct &I);
etc...
}
I get “‘struct’: missing tag name” when I try to compile. I’m using someone (who I trust) else’s coding “conventions”, which is where the “const struct &…” comes from, but if someone knows a better way to do that, then let me know.
structis a keyword in C++; it cannot be used as a type name. Use something else instead:(Type naming in C++ is different from that in other languages, such as C. In C++ you say,
class Dennis; Dennis x;, while in C you would have to saystruct Janet; struct Janet y;, or use a typedef to make a typename that you can use without saying “struct”.)