Friday, 27 April 2012

First Day

I've decided to spend one hour a day on learning to code with C++

So what have i done in my first hour? Well, maybe it's been a bit of a slow start. I've downloaded the compiler and had a look at a few basic functions and keywords. For example 

cont<<"I know it's not very advanced but still";

Well I'm going to go to bed now and do some more tomorrow, lets hope it starts to click then


  1. The structure of a C++ program ( a simple one ) is that of some #include files, an "entry-point", usually the "int main()" function in console apps, "using namespace std", and various other functions if you need/want them.

    Oh it's "C-out" not "cont"
    there is also a "C-in".

    #include //cout
    using namespace std;

    int main() //<-- entry-point
    cout << "Ehlo, world!";
    //return 0; // return 0 is added
    // automatically in the main function.

    Without "using namespace std;" you will need to prefix the standard (std) library functions/classes with std::, which is the namespace name "std" and the scope resolution operator "::".

    std::cout << "Ehlo, world!" << std::endl;

  2. Well it butchered some of my code, probably because it thought it was HTML.

  3. Enjoy learning a programming language. I learned Java recently and I found it super interesting.