Create C Module Called Chesspiece Defines Structured Type Named Chesspiece Associated Func Q37180115

Create a C++ module called ChessPiece that defines a structuredtype named ChessPiece and associated functions. Give the completecontents of the ChessPiece.h file. Show any lines needed to protectthe file against being included multiple times in a program. Showany lines needed to include libraries.

The ChessPiece type has fields for: colour (either “black” or”white”), name (e.g., “king”), row (from 0 to 7), and column (from0 to 7). Choose the most appropriate type for each field.

Give prototypes for three functions that operate on values ofthe ChessPiece type. Each function takes aChessPiece as its firstparameter; this parameter should be passed efficientlyand, if appropriate, guaranteed

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.