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

C++ Console Lesson 44: Using Char Array Strings

Loading...

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

Uploaded by on Oct 30, 2009

http://xoax.net

This C++ video tutorial explains how to use ASCII char arrays as strings in C++. Although char arrays as strings have been superceded by the STL string type type, they are common in legacy code and remain in use.
Lesson Page: http://xoax.net/comp/cpp/console/Lesson44.php

Please submit all questions to our forum: http://xoax.net/forum/

  • likes, 2 dislikes

Link to this comment:

Share to:

Top Comments

  • Thank you, thank you, thank you.

    +5

  • Good job! 5/5!

see all

All Comments (25)

Sign In or Sign Up now to post a comment!
  • u teach very well

    

  • @Decepticons211 is the number of characters u will be able to put in the array

  • @Decepticons211 Just like any other array, it means that the value you enter for the char array can only be 10 characters long. This includes the terminating null character /0 so in reality the string you want in your char array can only be n-1 characters long, where n is the array size.

  • Just a question, What is the meaning of the ten in the brackets next to your char variable name. PLZ SOME ONE HELP ME!!!! PLZ REPLY!

  • Why??? For what reason you use char instead std::string???

  • seriously I love you

  • @matrixITALIA Seriously? Did you not learn?

    int stringLength = strlen(myString);

    // Add one for null-terminator.

    char* fullString = new char [stringLength + 1];

    That should give the result you're looking for.

  • tnx for the tut. again

  • @1rescen1 What is the point in saying CHar. All of my instructors and professors have always said char, 'Car'. Because that is how it is pronounced in the word Character.

  • @TheRaelykSky char

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