struct MYSTRUCTURE
{
char sName[100];
int iAge;
};
Проблемы со структурой
#include<iostream.h>
#include<string.h>
// Îáúÿâëåíèå ñòðóêòóðû
Struct MYSTRUCTURE
{
char sName[100];
int iAge;
};
void main(void)
{
MYSTRUCTURE MyStructure;
strcpy(MyStructure.sName,"Andy");
MyStructure.iAge=13;
cout<<My Name is";
cout<<MyStructure.sName;
cout<<"and I am";
cout<<MyStructure.iAge;
cout<<"years old." <<endl;
}
Код: