C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 04-28-2009, 10:00 PM   #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!
dnguyen1022 is offline   Reply With Quote
Old 04-28-2009, 10:12 PM   #2
Registered User
 
Join Date: Apr 2006
Location: United States
Posts: 3,201
The picture is probably ASCII art since the representation is a string vector.
__________________
Os iusti meditabitur sapientiam
Et lingua eius loquetur indicium

"There is nothing either good or bad, but thinking makes it so." (Shakespeare, Hamlet, Act II scene ii)

http://www.myspace.com/whiteflags99
whiteflags is offline   Reply With Quote
Old 04-29-2009, 04:21 PM   #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
dnguyen1022 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 12:00 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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