Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C++ Lesson 2: Variables

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,370
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 3, 2011

Overview of variables in C++.

This tutorial covers:
how declare a variable
the difference between data types
how to read in data from the console
how to print to the console

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (macheads101)

  • is this differrent from creating ios apps?

  • @jsne10 These tutorials are on how to create C++ programs. iOS applications are written in Objective-C, which is somewhat different than C++.

  • my xcode says that "cout", "cin" and " endl" are undeclared and doesnt allows me to run the program.... what do i need to do?

  • @DrumLifeForever did you remember to say "using namespace std;"

  • @macheads101 yes and it wont recognize that either ;

    it says : expected `=``` `-` `asm` ot `atribute`before `namespace`

  • @DrumLifeForever If you send me the code in a personal message (i.e the entire main.cpp file), I can help you fix it.

  • @DrumLifeForever did you include iostream?

see all

All Comments (17)

Sign In or Sign Up now to post a comment!
  • just wondering, but can you do python tutorials?

  • You explain things amazingly!! You're the best!

  • this is a good tutorial but for the record "integer", "initial" and i forgot the other ones

  • Important note: you actually should include the string header in order to use std::string in the proper, standard-conformant way (i.e., so that it works on all the compilers that follow the C++ standard).

  • Keyword "double" stands for double-precision floating-point number (as opposed to a single-precision one, which is just called "float"). While the C++ standard doesn't specify how much is double-precision, your particular hardware (and, in general, the AMD/Intel-based platforms) follows the IEEE-754 standard, where double uses 64 bits, whereas single-precision "float" uses 32 bits. For more, see youtu.be/ClT4B7bpau4. A "decimal" is usually associated with fixed-point numbers, different thing.

  • it's about the content buddy not the length. and we can pause anytime lol

    thanks for the video :)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more