Hello There, Can I someone explain this problem. I dont understand what mean. I have read over and over i still dont get it.
Assume you need an application that operates on two kinds of data types D1 and D2. Both D1 and D2 need to be defined with typedef.
Assume you need some functions to operate on the data: f1D1() and f2D1() operating on D1 and f1D2() operating on D2.
Assume a helper function fhD1() and helper integer intD1 to help the functions operating on D1 (not available to others).
Assume global data g1 and g2 of some built in type.
Assume the main created a variable of type D1 and then operates on it. D2 is not needed in main, but it is needed in f1D2().
Given this, and disregarding other details, design all files needed. Use inclusion-prevention. For each file you have, show important elements, disregarding other details. Submit as actual files with the actual names.
Here is what I have try
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#typedef D1
#typedef D2
Main.cpp
void main
{
D1 (a);
}
D1.cpp
void D1 (a)
{
f1D1 (c);
f1D2(b);
}
D2.c
void D2(z)
{
fiD2 (x);
}
fhD1.cpp
viod fhD1 (p)
{
int D1 (p);
}
|