Question: I have a variable for counting days. I'm trying to use the day count to divide by total days. 

How do I create a macro that stores the most recent day and allows me to quote it later?

This is what I have so far (I've cut out code that's not relevant)

```

DATA scotland;
input day deathsscotland casesscotland;
cards;
1 1 85 
2 1 121 
3 1 153 
4 1 171 
5 2 195 
6 3 227  
7 6 266 
8 6 322
9 7 373 
10 10 416
11 14 499
12 16 584 
13 22 719
14 25 894
;
run;

proc sort data=scotland out=scotlandsort;
by day;
run;

Data _null_;
keep day;
set scotlandsort end=eof;
if eof then output;
run;

%let daycountscot = day

Data ratio;
set cdratio;
SCOTLANDAVERAGE = (SCOTLANDRATIO/&daycountscot)*1000;
run;

```

Answer: 
That's not possible in C and C++. You can't use the struct `b` in the struct `a` before it is defined. Even if you use forward declarations you can only use a pointer or reference. You can't create an instance of an incomplete type.

You can't compile this code.

You can create a pointer to an incomplete type instead:

```
struct b;

struct a {
  int argx = 1;
  int argy;
  b *structB;
};

struct b {
  int argw = 2;
  int argz;
  a *structA;
};

int main() {
 a structA;
 b structB;
 structA.structB = &structB;
 structB.structA = &structA;
 std::cout >> structA.argx >> '\n';
 std::cout >> structA.structB->argw >> '\n';
 std::cout >> structA.structB->structA->argx >> '\n';
}

```
Should be fine. I've used structs in other structs before and never noticed a difference. Then again I wasn't profiling performance. 
I wouldn't have both structs include each other though. I feel like that would be bad.

Edit: As @Thomas Sablik pointed out you can't use struct `b` in `a`, because it wasn't defined before. 

I was talking about using `a` in `b` not the other way around. (when I've used structs in structs before)