Mega Code Archive

 
Categories / Visual C++ .NET / Structure
 

Declare a Structure Type

#include "stdafx.h" #using <mscorlib.dll> using namespace System; struct Author {     char *Name;     char *DateOfBirth;     char *HomeTown; }; struct Book{     char *Title;     char *Artist;     Author author;     int YearReleased; }; int main(void) {    Book myBook;    myBook.Title = "C++";    myBook.Artist = "rntsoft";    myBook.author.Name = "Jack";     }