confusion on use of datatypes!

This is a discussion on confusion on use of datatypes! within the C++ Programming forums, part of the General Programming Boards category; what is the data type for taking inputs of words or sentences? or can i use char data type like ...

  1. #1
    C++Pandit
    Join Date
    Jul 2008
    Posts
    49

    confusion on use of datatypes!

    what is the data type for taking inputs of words or sentences?

    or can i use char data type like

    Code:
    char a[20];

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Saimadhav View Post
    what is the data type for taking inputs of words or sentences?

    or can i use char data type like

    Code:
    char a[20];
    Yes, you can use a char array, but in C++ it's better to use the std::string class.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Terrible confusion with time variables
    By LowlyIntern in forum C++ Programming
    Replies: 12
    Last Post: 08-01-2008, 08:23 AM
  2. Server-net newbie confusion
    By geek@02 in forum Windows Programming
    Replies: 1
    Last Post: 04-28-2005, 03:08 AM
  3. confusion with increment and decrement operators
    By cBegginer in forum C Programming
    Replies: 6
    Last Post: 03-19-2005, 03:45 PM
  4. Unicode - a lot of confusion...
    By Jumper in forum Windows Programming
    Replies: 11
    Last Post: 07-05-2004, 08:59 AM
  5. C++ Datatypes and OS Datatypes :: C++
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 12-07-2002, 02:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21