Thread: How would I got about fixing this?

  1. #1
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Out of scope

    How would I got about fixing this?

    key_press = getch();
    strcat (spell_word, key_press);
    This doesn't work because, getch() requires key_press to be a CHAR and strcat() requires key_press to be a CONST CHAR (String).

    Any way around that?
    Sent from my iPadŽ

  2. #2
    Registered User
    Join Date
    Jan 2005
    Something like this
    key_press = getch();
    for (int i=0;spell_word[i];i++);
    You could also keep track of the length of the string somewhere to be more efficant.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fixing Z-order on a modeless dialog?
    By Viper187 in forum Windows Programming
    Replies: 6
    Last Post: 06-20-2008, 07:10 PM
  2. Fixing incorrect extern declaration
    By cunnus88 in forum C++ Programming
    Replies: 4
    Last Post: 03-30-2007, 03:55 PM
  3. Fixing my (Stupid) IE Menubar
    By civix in forum Tech Board
    Replies: 2
    Last Post: 01-04-2004, 02:22 AM
  4. Fixing Laptops
    By zdude in forum Tech Board
    Replies: 5
    Last Post: 06-16-2003, 01:56 AM
  5. Need help fixing bugs in data parsing program
    By daluu in forum C Programming
    Replies: 8
    Last Post: 03-27-2003, 06:02 PM