>> DAVID MALAN: Let's write a program with a graphical user interface,
otherwise known as a GUI.
And for this, we'll use Stanford's portable library, which comes with
some header files of its own.
Let's dive in.
>> First, I'm going to include a file called gwindow.h.
And notice, first that I'm using quotes instead of angle brackets
because this header file happens to be in a sub directory
of my current directory.
Next, let's declare main as usual, int, main, void.
And now let's proceed to instantiate, so to speak, that is create a
graphical window.
Otherwise known as a gwindow, as follows--
Gwindow window equals new gwindow.
>> And now I need to specify the width and the height of this window.
I'm going to go with something somewhat arbitrary, but somewhat
small, so that it fits within the appliances window.
Specifically, 320 by 240 pixels.
Recall then, that a pixel is one of those dots on your screen.
Next, let's go ahead and do not much of anything at all and simply pause
for 500 milliseconds.
Calling a function called pause that also is in the
Stanford portable library.
>> Finally, after those five seconds, let's go ahead and close the gwindow,
as follows.
And then let's return zero signifying that we're all done.
>> So what is this program done?
Well, in a moment we should see, when we run in, that it opens a window
that's 320 pixels wide by 240 pixels wide.
That window just lingers there for five seconds and then
it should go away.
Make window, dot, slash, window.
And there's our window, on the top left hand corner of my screen.
And in just a few seconds it's gone.