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

C++ Tutorial (8) - Absolute n00b spoonfeed

Loading...

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

Uploaded by on Apr 6, 2008

Video tutorials about programming in the C++ programming language.

Part 8:
* int, short, long
* unsigned short
* unsigned long
* signed short
* signed long
* cout concatenation

Pardon my imperfect english.

Forum: http://cpptutorials.freeforums.org/

If you have any suggestions about how to make this video clearer, more n00b helpful, and explanatory, please send me a message.

If you have any C++ questions, please comment.

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (antiRTFM)

  • int by itself is a positive value?

  • @phantomofthedrivein if your asking about the default definition of just "int" (as in contrast to "unsigned short int" for example), depends on your compiler.

    In Visual C++, i think by default "int" is "signed long int" which means it can have negative values

  • Here's my question, whats the advantage of using a short int? when a long int can do everything a short int can do but more.

  • generally speaking you are right, go ahead and just always use long int.

    technically though, usually short int uses less memory (2 bytes less) than long int.

    in the interesting event that your program will have 100,000,000 ints, that would be 400 MB of RAM with long int, but only 200 MB of RAM with short

Top Comments

  • Thank you very much for these great C++ tutorials. :D

    I readed through a lot of tutorials on the internet but most of them were like Chinese to me. Your tutorials however are very clear and fun to do. I understand it a lot better now. ^^

see all

All Comments (111)

Sign In or Sign Up now to post a comment!
  • @pk1lover Signed is both positive and negative

    unsigned is only positive

  • he said int is like signed long

    but in da previous video int took a positive number

  • Writing in c++ with sons of obsidian theme rocks. :D

  • question: can you use a number that goest above 0 in a signed int???

  • @antiRTFM int is always signed. char may be signed or unsigned depending on what compiler you're using, but int is always signed.

  • Four billion, two hundred ninety-four million, nine hundred sixty-seven thousand, two hundred ninety five.

  • I can't express in words how good your videos are. I've learnt so much and I honestly thought that it would take ages to learn but you are such a good teacher, thank you so much. You are definitely a YouTube legend! :D

  • @iExD practice often

  • Should you only use \n for text and endl for numbers?

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