simple dictioanry problem (newbies)

This is a discussion on simple dictioanry problem (newbies) within the C++ Programming forums, part of the General Programming Boards category; I tried to define a dictionary array like this: AnsiString dictionary[]= {"bread", "juice", "water"...etc then as I was testing to ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    20

    simple dictioanry problem (newbies)

    I tried to define a dictionary array like this:

    AnsiString dictionary[]= {"bread", "juice", "water"...etc

    then as I was testing to see if I can refer to each word seperately, I tried:

    Edit1->Text=dictionary[2]; // to print out the word in the edit box

    hoping the word juice would come out! but only the letter 'r' came out from the word bread!
    how do I get the whole word 'juice"...etc

  2. #2
    Unregistered
    Guest
    I don't think AnsiString is a valid datatype or class, try
    String dictionary[] = {"bread", "juice", "water"...etc
    or
    char *dictionary[] = {"bread", "juice", "water"...etc

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A simple file I/O problem
    By eecoder in forum C Programming
    Replies: 10
    Last Post: 10-17-2010, 12:00 AM
  2. Problem in very simple code
    By richdb in forum C Programming
    Replies: 22
    Last Post: 01-14-2006, 09:10 PM
  3. Simple File I/O problem
    By Ignited in forum C++ Programming
    Replies: 3
    Last Post: 01-07-2006, 10:49 AM
  4. Simple Initialization Problem
    By PsyK in forum C++ Programming
    Replies: 7
    Last Post: 04-30-2004, 08:37 PM
  5. Simple OO Problem
    By bstempi in forum C++ Programming
    Replies: 1
    Last Post: 04-30-2004, 06:33 PM

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