Program for Structure local to a function


#include <iostream.h>
#include <conio.h>
void main ( )
{
void function ( ) ;
clrscr ( ) ;
function ( ) ;
getch ( ) ;
}
void function ( )
{
    struct date
    {
        int day ;
        int month ;
        int year ;
    } ;
    struct date todays_date = { 22, 6, 2007 } ;
    cout<<"Today's Date : ";
    cout<<todays_date.day;
    cout<<"  "<<todays_date.month;
    cout<<"  "<<todays_date.year;
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|