Okay. We're going to now show you code that demonstrates some of the ideas from what we were just talking about in the use of the preprocessor and this piece of code is going to generate at random a thousand male elephant seal. Actually southern male elephant seal weights. Let's look at it. We, of course, have our sharpened clues. Here we're using three of the standard libraries. Each one has some functions already defined or declared that are available to us for this. So again important rule, anytime there's a standard function that does the job, make use of it. Next thing we use is very simple macro and that's a sharp define of a constant. Then we use the identifier for constants where are we use all caps. You can see one's called max elephant seal weight male 8,800 pounds and min elephant seal weight male 4,400 pounds. Just if you want, you can look up the Southern elephant seal females. They're considerably smaller and they're typically somewhere in excess of 880 pounds. Now we have some more complicated macros. We again have some range that's the gap between the mini-max weight is 4,400. We want a generate a population of a 1,000 sample weights. Here, we're defining a macro that calls some code and here you can recognize the code as our basic rand which is found in standard library and we modulo it over range, why? Because we want to get something within the range of 0 to 4,400. Now the weight is going to be the weight over that's generated by this. So this macro coming after that macro makes use of it plus the minimum elephant seal weight male. So we're generating a range and we're adding it to what could be the minimum so that could be anywhere from 0 to 4,400 and then we'll get in effect random weights in this range and look how we generate them. Now we write a multi-line macro. In this multi-line macro, the backslash character says the macro's really defined on two lines and that could be extended as many black slash that I needed for that macro. Here we have some more elaborate code for I equals 0, I less than population, I++ data of I equals weight. So you can see what it's doing. For each entry in what has to be a array or data array, we're going to call on this weight function. A weight function is calling on the weight over macro and adding in the minimum elephant seal weight. Finally, we have a function to print the data. It's a basic function. That should be at no surprise to you. You have to pass in the array and the size and it says just print the size, print that tab separated and then every 10 values, print on a new line. Then we actually have the code and that code is int main, int i, int data of population so we're getting our thousand there. So it's relatively easy to redefine this code. We can redefine also the range if we want. If we wanted to build something for the northern elephant seals which are slightly lower, we could rewrite the code for northern elephant seals. Here again is something we've seen before when we use the random number generator. We want each time we call the program that have something different and this allows us to reset the seed based on a system's clock. We don't always get the same value, so we get a different seed. So we'll get different data each time we call this. Then we get the fill. Notice fill and all of this stuff depends on a preprocessor. Then you'd actually see if you could expand if you use that minus expand flag what the actual code for these things would be. This is more readable, population, fill population and let's execute the code. Just to show I already compiled it. Sure enough, if you look at these numbers and just scan them, you can see there in the given range. Okay. So that shows you how powerful macros are. One cautionary tale, nowadays in the C and C++ community, there's much less reliance on macros especially ones that involve code. In general for code segments, we either let the compiler optimize it or for example in the C++ language and some C compilers you can call a function inline and that asks the compiler to optimize it much like a would be for macro and that is much safer code, more check.