Solved

Information on Structs

Posted on 2004-09-06
2
228 Views
Last Modified: 2010-04-15
Hi,

I have a multi file project where I have 3 structs.

Is it possible to have something like the following

Struct Date
{
int day;
int month;
int year;
};
&
Struct Record
{
Date aDate;// and have this as a valid part of this struct
string whatever;
string whatever;
};
I have a program where I need to specify a date variable in a different struct as above.

Kaz
0
Comment
Question by:KazIT
2 Comments
 
LVL 15

Accepted Solution

by:
efn earned 125 total points
ID: 11993789
Yes, you can certainly do this.  It's a standard data structuring technique.
0
 

Author Comment

by:KazIT
ID: 11993796
thanks efn....the points are yours.

Kaz
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now