Thread: Display all characters that lie between two given indices

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    8

    Display all characters that lie between two given indices

    Hello, everyone.

    I consider myself new to C++ and I have tried to google for it and all it come up with is for string which I think my teacher want me to use c-string. Also, I have look in the textbook and I can't find any similar exercise. This is what I came up with
    Code:
    char str1[200]= {0};
        for (int n = 0 ; n < begin_display; n++)
        {
            str1[n] = str[n];
        }
        return str1[200];
    and here is example:

    enter a string: My brother Joseph is married.
    Please enter the beginning index: 5
    Please enter the ending index: 12
    other Jo



    Thank you for your help. I'm greatly appreciate it
    Last edited by witt; 09-22-2011 at 10:46 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. XNA 3d - 32 bit indices
    By musicman in forum Game Programming
    Replies: 1
    Last Post: 09-06-2011, 10:15 PM
  2. How to display extended ASCII characters in LINUX
    By mocatz187 in forum C Programming
    Replies: 6
    Last Post: 01-23-2010, 12:34 AM
  3. Inconsistent display of tab characters in edit control
    By New++ in forum Windows Programming
    Replies: 0
    Last Post: 01-06-2006, 08:34 AM
  4. Array of indices
    By ronenk in forum C Programming
    Replies: 4
    Last Post: 06-15-2004, 05:36 PM
  5. What does 'indices' mean?
    By Shadow12345 in forum C++ Programming
    Replies: 1
    Last Post: 11-15-2002, 07:54 AM