Username:
Password:
C++ Fundamentals Tutorials

Introduction / Testing MS Visual C 2005 Express Edition

Subtitles of the Movie

Alrighty, glad to have you back. That was a fun few minutes huh? Did you go and get the Visual Studio 2005 C Plus Plus Express Edition and all of its however many megabytes it is these days. All of it sized downloaded and installed and updated and maybe you had a couple of reboots in there, sometimes that has happen as it gets itself into order and loaded. Well good, let's see if all of that work you just did actually functions are not. What we are going to do is we're going to start the Express Edition, visual studio and then we're going to create a project we're going to create a common language runtime project, the CLR and that's Microsoft's implementation of the CLI standard which is a way for multiple languages, cause you see how many languages visual studio supports, this is a way for those languages to be able to depend on one another and to pass data between each other, so if your part of a development team that somebody wants to create in J Sharp or C Sharp or somebody else wants to do visual basic if they select CLR, the common language runtime then things will be loaded properly and each of you can call the others function and you can share information and share blocks of code between each other. We'll give the project a name, call it Hello world, and then we will run our little project cause it'll already have, Hello world, in it, they know what you want to do for your first program so they are going to put that in there and we'll run it without debug and that's control F5. I'll show you where it is on the menus. So let me switch out here, bring up my all programs, and then I need to drop way down here to Visual Studio because it doesn't go into Microsoft it goes under Visual C Plus Plus 2005 Express Edition down here and then there's the command prompt. You probably, if you went through the C programming course with me you remember that's where we got our command prompt from, we never went into the IDE. So now we are going to go into the integrated development environment and fire it off. So that's this guy here. So that's our express edition, we'll start it up and that's what it should look like. I reset my menus so that it would look the same as yours should look the first time you run it. And I don't like this solution explorer pinned open so I am going to click that off so we have alittle more space to work with in here. So now all we need to do is create a new project, if we drag that down just a little bit you can probably see it if our on a 1024 by 768 screen but I need to drop this down a little bit so I can find create. I can do a create project in here or I can come up here and I can do a file new project, either way your going to get to the same place. And that's right here, that's a new project. Now you may not have win 32 available in your Visual C Plus Plus set, that takes yet another download from Microsoft from that very same site that you were in which gives you a development, software development kit and a series of libraries and such to be able to call on the win 32 code. We want the CLR anyway and you should definitely have that in your toolkit under Visual C Plus Plus. We are just going to make a console application because we're more worried about the language then we are about making pretty forms and text fields and all that sort of thing. We're going to deal more with the C Plus Plus, so we'll just make a CLR, console application which will pop up in a black screen, we come over here and we need to enter a name and we'll just call it, Hello world. And we'll say ok, you can see where it's going to put it in your Visual Studio 2005 projects and I'll let it create a directory for that and it starts doing its thing and there we go. So here is our first C source that it created, it says Helloworld.ccp and that's the way these files are named, that's a C Plus Plus file and we'll talk about all these other things namespaces and this is a Microsoft thing here but that's ok, we'll get that as well. But here is our main function, remember in C you always had to have a main function, well that doesn't change and we have a nice little write line class which is going to be used at its part of, uh write line method that is used out of the console class and this is so nice about Microsoft when you drop your cursor over a word it tells you where this thing came from, it's a reference to class system console, sealed abstract and that's a standard input-output in error streams, cannot be inherited because its an abstract and so on. We'll get into all that, don't worry about but there is write line and that tells you all the possible interfaces that can be used to write line the different things that can pass into it. You see the first one there is void, the next one has a Boolean value, I can't point at those because it'll go away but there is write line void, write line Boolean value, there's a wide character T value so these are all the interfaces to the write line, so the write line can take in different kinds of parameters. What we're going to give it is this Hello World string right here and then we're going to return zero and get out of there. So we'll fill in all details on this stuff as we go through here and we talk about the language a little more, but as you can see it's not really too different from what we know in C already. And if you don't know C that's cool, that's you don't have to, we already talked about that. So to start this thing we come up here to debug and click that and what we want to do is start without debugging and I'll show you why here as we go. But that's control F5 for when your doing iterative programming and you want to make a few changes and run it through its paces real quick, its just easier to do a control F5. So we are going to start without debugging and then watch this lower window down here, the output window showed up and there you can see the compiled process, the linking process, its exceeded, nothing failed, everything is up to date, nothing was skipped and there's our Hello World and now press any key to continue, that's because we ran it without debug, so the program has finished and it stops and since it's a command line program the IDE understands that we might want to see what came out before it goes running off so it gives us a press any key to continue and we can do that. If we do a debug start debugging at five we don't have any break points set, it'll Flash Hello World and then leave again because we didn't tell it to stop any place, so it just ran right on through. OK if you can get yours to do that, and I hopefully if you downloaded everything that they asked you to and you put it all in there then good, your set, our next video will make a modification to this program and make sure that we can make changes and save the files and so on and then rerun it so we'll do that here in our next video.

Tutorial Information

Course: C++ Fundamentals
Author: Tim Heagarty
SKU: 33797
ISBN: 1-934743-09-7
Release Date: 2007-09-14
Duration: 4 hrs / 55 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available