Solved

Information on Structs

Posted on 2004-09-06
2
232 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

790 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