Need help understanding a problem

This is a discussion on Need help understanding a problem within the C++ Programming forums, part of the General Programming Boards category; Hi all, I need help understanding a problem given in the Accelerated C++ book on page 100, problem 5-5. The ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    110

    Need help understanding a problem

    Hi all,
    I need help understanding a problem given in the Accelerated C++ book on page 100, problem 5-5.

    The problem states
    Code:
    Write a function named center(const vector<string>&) that returns a picture in which all the lines of the original picture are padded out to their full width, and the padding is as evenly divided as possible between the left and the right sides of the picture.  What are the properties of pictures for which such a function is useful?  How can you tell whether a given picture has those properties?
    So this function, center, takes in a vector of strings, but the problem talks about a picture. Can somebody help me get a clear understanding of this problem? Thank you!

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,706
    The picture is probably ASCII art since the representation is a string vector.

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    110
    what does it mean with this part?

    Code:
    ...which all the lines of the original picture are padded out to their full width

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  5. facing problem in understanding this....
    By enggabhinandan in forum C Programming
    Replies: 10
    Last Post: 10-25-2006, 05:30 AM

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