Click here to Skip to main content
15,921,548 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please how do I create broken rectangular dashed border around a text in C++

Like this:
 ----------------------------
|  1. orange                 |
|  2. apple                  |
|  3. mango                  |
|  4. pineapple              |
|                            |
 ----------------------------


What I have tried:

Please how do I create broken rectangular dashed border around a text in C++
Posted
Updated 31-Oct-16 18:00pm
v2
Comments
[no name] 31-Oct-16 17:50pm    
By making use of GDI/GDI+ and a little math

1 solution

C++
std::cout << " ---------------------------- " << std::endl;
std::cout << "|  1. orange                 | " << std::endl;
std::cout << "|  2. apple                  | " << std::endl;
std::cout << "|  3. mango                  | " << std::endl;
std::cout << "|  4. pineapple              | " << std::endl;
std::cout << "|                            | " << std::endl;
std::cout << " ---------------------------  " << std::endl;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900