Sunday, 15 June 2014

struct - error: ISO C++ forbids declaration of '' with no type -


I got the error: ISO C + + Not included with the illegal declaration 'illegal sig' Header file, how to solve it?

  straight arguments {InvalidSig * context; // error string mname; }; Class invalid {{...}}  

You can declare < Code> square invalid seal above:

  square invalid sig; Struct args {InvalidSig * context; // ...};  

You can also do this, if you want to use the name before its definition:

  struct args {class InvalidSig * context; // ...};  

I recommend avoiding the latter situation, as is more common in the past and anyone reading your code will not be less confused.


No comments:

Post a Comment