help to work on structures..

Reply

Join Date: Nov 2008
Posts: 90
Reputation: ajay.krish123 is an unknown quantity at this point 
Solved Threads: 8
ajay.krish123 ajay.krish123 is offline Offline
Junior Poster in Training

help to work on structures..

 
0
  #1
Jul 3rd, 2009
I am getting problem to work with the structures..I am works on DBMS project in c languge . I wanted to use multiple structures without the use of the pointers but unable to use it as:
  1. struct File1
  2. {
  3.  
  4. -----
  5. -----
  6. }f1;
  7.  
  8. struct FILE
  9. {
  10. ---
  11. ---
  12. struct File1 ;
  13. }
so plz tell me the problem with it.Thanks in advance.
Last edited by ajay.krish123; Jul 3rd, 2009 at 8:12 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 476
Reputation: csurfer is just really nice csurfer is just really nice csurfer is just really nice csurfer is just really nice csurfer is just really nice 
Solved Threads: 75
csurfer's Avatar
csurfer csurfer is offline Offline
Posting Pro in Training

Re: help to work on structures..

 
0
  #2
Jul 3rd, 2009
Your usage is incorrect.You can use it as :
  1. struct File1
  2. {
  3. //Your structure definition
  4. };
  5.  
  6. struct FILE
  7. {
  8. //Your other members
  9. struct File1 f1;//Here File1 acts as a abstract data type
  10. };

You can also use the same thing above as this :
  1. struct File1
  2. {
  3. //Your structure definition
  4. }f1;
  5.  
  6. struct FILE
  7. {
  8. //Your other members
  9. f1;//Here use f1 directly
  10. };

For more details have a look at this.
Last edited by csurfer; Jul 3rd, 2009 at 8:24 am.
I Surf in "C"....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC