Support Forums

Full Version: Learn C++ (The Correct Way) - Lesson 1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Very good tutorial man!!
Make a video man. There easier for visual people.
Great tutorial dude. Nicely written, keep up the good work. Smile
Very good beginner tut.

When i try to install C++ Express Edition, i get a error, it just says like Microsoft Visual C++ SP1 - ENU.

Any fix for that, im using Vista.
very nice tutorial... book marking this so i can come back when i have downloads so i can download the compilers and actually do this Big Grin
This thread just gave me deja-vu, anyway, Codeking: you posted this on HF did you not?
(10-25-2009, 04:35 PM)Аноним Интерфейс Wrote: [ -> ]This thread just gave me deja-vu, anyway, Codeking: you posted this on HF did you not?

(10-08-2009, 12:11 PM)Code King Wrote: [ -> ]Thanks guys, ill transfer part 3 from HF later on.
nice CodeKing lol Im relearning c++ to catch back up.
Sorry, I have to rant on namespaces and such.

Instead of:
Code:
#using namespace std;

You could just use:
Code:
#using std::cout;
#using std::cin;
#using std::endl;

The difference:
Instead of being too general and saying "I want to use everything from the library std", you limit it to "I want to use cout, cin and endl from the library std".
It gives a nice balance between safety and comfort. And if someone else ever reads your code, they can immediately see what's being "used". ^^

The copy-paste version would look like this:
Code:
#include <iostream>
#using std::cout;
#using std::cin;
#using std::endl;

int main()
{
    int age;
    cout << "How Old Are You?" << endl;
    cin >> age;
    cout << "You Are " << age << " Years old!" << endl;
    system("PAUSE");  
    return 0;
}
Good job, but not useful at all.

Millions of tutorials already out there, this is nothing unique.
Pages: 1 2 3 4 5