How to declare word in c++?

This is a discussion on How to declare word in c++? within the C++ Programming forums, part of the General Programming Boards category; I was wondering how one would go about declaring a word in msvc++ 6.0. I checked MSDN but the did ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    26

    Question How to declare word in c++?

    I was wondering how one would go about declaring a word in msvc++ 6.0. I checked MSDN but the did not have any information on the subject.

    -JLBShecky

  2. #2
    Burning in Hell! Luigi's Avatar
    Join Date
    Nov 2002
    Posts
    117
    what do u mean word like a simple sentence?

    Code:
    #include <string>
    string str = "A simple sentence.";
    Luigi


    // I use Xcode 1.1 && CodeWarrior 8.3
    // When on Mac Os X 10.3.2

    // I use Microsoft Visual C++ 6.0
    // When on windows XP

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    It is not possible to declare a word in C++.
    The word-length varies from machine to machine.

    Often a "short int" is a word, but one cannot be sure.

    If you're using Win API, there's a type called WORD. Use it.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    Registered User devil@work's Avatar
    Join Date
    Mar 2003
    Posts
    33
    do you mean declearing a word like a int ? if so it is not possible cause int and other number types has fixed sizes but word dont have fixed sizes so use a string you cant define one.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hangman game and strcmp
    By crazygopedder in forum C Programming
    Replies: 12
    Last Post: 11-23-2008, 05:13 PM
  2. Passing structures to a function
    By earth_angel in forum C++ Programming
    Replies: 5
    Last Post: 07-13-2005, 06:13 AM
  3. BST Add word Node
    By PunkyBunny300 in forum C++ Programming
    Replies: 0
    Last Post: 12-13-2003, 01:10 PM
  4. Word Count
    By simple in forum C Programming
    Replies: 12
    Last Post: 10-04-2002, 10:47 PM
  5. Help reading text file word by word
    By Unregistered in forum C++ Programming
    Replies: 6
    Last Post: 05-25-2002, 05:13 PM

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