DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   help to work on structures.. (http://www.daniweb.com/forums/thread201448.html)

ajay.krish123 Jul 3rd, 2009 8:12 am
help to work on structures..
 
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:
struct File1
{

-----
-----
}f1;

struct FILE
{
---
---
struct File1 ;
}
so plz tell me the problem with it.Thanks in advance.

csurfer Jul 3rd, 2009 8:18 am
Re: help to work on structures..
 
Your usage is incorrect.You can use it as :
struct File1
{
//Your structure definition
};

struct FILE
{
//Your other members
struct File1 f1;//Here File1 acts as a abstract data type
};

You can also use the same thing above as this :
struct File1
{
//Your structure definition
}f1;

struct FILE
{
//Your other members
f1;//Here use f1 directly
};

For more details have a look at this.


All times are GMT -4. The time now is 2:01 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC