Thread: How to declare word in c++?

  1. #1
    Registered User
    Join Date
    Apr 2003

    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.


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

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

    // 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
    Göteborg, Sweden
    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
    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, 06: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, 02: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