Print horizontal/vertical lines?

D

desktop

Is there some function i C++ that prints a horizontal/vertical line in a
shell like

printHor(2,7);

that prints a straight continuous line with the size of 5 chars?
 
V

Victor Bazarov

desktop said:
Is there some function i C++ that prints a horizontal/vertical line
in a shell like

printHor(2,7);

that prints a straight continuous line with the size of 5 chars?

I am not sure what you mean. What's a "continuous line"? C++ can
print anything your console can display, just put the proper text
in
std::cout << {proper text};

If you need N adjacent characters '-' (minus), do

std::cout << std::string(N, '-');

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top