الأحد، 22 ديسمبر 2013
2:49 م

structure and function


#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
struct date
{
int day;
int month;
int year;
};
void display(struct date);
void main()
{
date today;
today.day = 3;
today.month = 7;
today.year = 1993;

display(today);
_getch();
}
void display(struct date one)
{
cout << "the data is : " << one.day << "/" << one.month << "/" << one.year;
}

0 التعليقات:

إرسال تعليق