wierd problem

This is a discussion on wierd problem within the C Programming forums, part of the General Programming Boards category; so ive got this code that prints the puzzle in disguise using arrows or question marks. but i need the ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    28

    wierd problem

    so ive got this code that prints the puzzle in disguise using arrows or question marks. but i need the spaces to be shown and not in hidden by the different types of question marks or arrows or *'s. if i could get some help it would be much appreciated.
    Code:
     
                      int i;
                      int solve;
                      int weel;
                      char letter;
                      char *Phrase_ptr, *Puzzle_ptr;
                      printf("/////////////////////////////// \n\n");
                      Phrase_ptr = strtok(clue1,"%");
                      printf("The category for this round is: %s\n\n",Phrase_ptr);
                      printf("///////////////////////////////\n");
                      Puzzle_ptr = strtok(NULL,",");
                     printf("Here's the puzzle: \n");
                     for (i = 0; i < strlen(Puzzle_ptr); ++i)
                     {
                      printf("%c",Puzzle_ptr);
                      }

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    This betrays a bit of newness:
    Code:
                     for (i = 0; i < strlen(Puzzle_ptr); ++i)
                     {
                      printf("&#37;c",Puzzle_ptr);
                      }
    Could you post more of the code?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  2. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  3. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  4. Replies: 5
    Last Post: 11-07-2005, 10:34 PM
  5. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM

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