Thread: Array

View Single Post

  #2 (permalink)  
Old 07-29-2009, 04:32 PM
ba7ora's Avatar
ba7ora ba7ora is offline
Junior Member
 
Join Date: Jul 2009
Location: Oman
Posts: 5
ba7ora is on a distinguished road
i think u have 2 use STRICTER 2 do this so .... i dont know maybe it will help u

this is an example of STRICTER WITH POINTERS mybe will help 2

#include<iostream>
using namespace std;
struct stu,*a;
void main()
{
int id;
char name[20];
};
struct stu *a,b;
cout<<"Enter the ID"<<endl;
cin>>b.id;
cout<<"Enter the name"<<endl;
cin>>b.name;
a=&b;
cout<<"The student diteils are"<<endl;
cout<<a->id<<"\t"<<a->name;
}
Reply With Quote