Width and Length

I need helping coding this in c++.

the output should look like this... i know i have to use string and get line() but an someone give me a start.

Enter text, empty return will quit the input
> Every photo, every edit, every album now lives
> in your iCloud Photo Library, easily viewable
> and consistent on all your devices.
> Automatically. The all-new Photos app makes
> it simpler than ever to find and rediscover
> your favorite photos. And you can make every
> shot look even better immediately after you've
> taken it with powerful new editing tools.
>
> Enter the width of text: 25
|-------------------------|
|very photo, every edit,|
|every album now lives in|
|your iCloud Photo|
|Library, easily viewable|
|and consistent on all|
|your devices.|
|Automatically. The|
|all-new Photos app makes|
|it simpler than ever to|
|find and rediscover your|
|favorite photos. And you|
|can make every shot look|
|even better immediately|
|after you've taken it|
|with powerful new editing|
|tools. |
|-------------------------|
Enter the width of text: 30
|------------------------------|
|very photo, every edit, every|
|album now lives in your iCloud|
|Photo Library, easily viewable|
|and consistent on all your|
|devices. Automatically. The|
|all-new Photos app makes it|
|simpler than ever to find and|
|rediscover your favorite|
|photos. And you can make every|
|shot look even better|
|immediately after you've taken|
|it with powerful new editing|
|tools. |
|------------------------------|
Topic archived. No new replies allowed.