-7
  1. struct boolean_struct { int member; } typedef int boolean_struct::* boolean_type;

  2. typedef char(&yes)[1];

Please explain what these typedef are doing. I really want to understand them.

Arnav Borborah
  • 11,357
  • 8
  • 43
  • 88
  • These are covered in any reasonably [good text book](https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list). It will be helpful for your in the long run to work through a text book. Getting answers to these specific questions won't help you in the long run if you don't get a solid understanding of all the fundamental aspects of the language. – R Sahu Feb 05 '18 at 23:31
  • Did you do any research? – Xcoder Feb 06 '18 at 00:17
  • Hint: look up member function pointer syntax and array syntax. – Thomas Matthews Feb 06 '18 at 00:20

1 Answers1

-4

They create alias for some text for example: typedef int kappa; kappa a; // the type of a is int

Better than typedef is using alias because it's more readable, and their meaning is the same. using kappa = int; kappa a; // the type of a is int