Big Deal: First Console app using VS 11 Ultimate Beta on Windows 8

Wow, well I guess there is always that first app, usually we do a “Hello World”, but this time for some reason I did an addition.  Looks pretty much like a C program written in C++.  Oh well.

Here is what I did, really terrible I know, but as I said, this has been a pretty bad month for me, and I have to restart somewhere.

image

Once opened, you will need to go to the ConsoleApplication2.cpp and make it look like the following code (and note if you are taking a C++ class this is pretty close to what you use in class):

 

 // ConsoleApplication2.cpp : Defines the entry point for the console application.
 //
  
 #include "stdafx.h"
 #include <stddef.h>
 #include <iostream>
 //Namespace used because I use to use C a long time ago
 using namespace std;
  
 //prototyping
 long AddNum(long,long);
  
 int _tmain(int argc, _TCHAR* argv[])
 {
     AddNum(5,5);
     cout<<"Hello World it's a tenner "<<AddNum(5,5)<<endl;
  
     
     return 0;
 }
  
 long AddNum(long Num1, long Num2)
 {
     return Num1+Num2;
  
 }

Run it, best to use no debug or controlkey+F5, then you should see, wonderful

image