943,737 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 303
  • C RSS
Jul 3rd, 2009
0

help to work on structures..

Expand Post »
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.
Similar Threads
Reputation Points: 6
Solved Threads: 9
Junior Poster in Training
ajay.krish123 is offline Offline
90 posts
since Nov 2008
Jul 3rd, 2009
0

Re: help to work on structures..

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.
Reputation Points: 485
Solved Threads: 88
Posting Pro
csurfer is offline Offline
564 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: please hlep ()
Next Thread in C Forum Timeline: adding from 0 to a number that will be entered by the user .





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC