Answer the question
In order to leave comments, you need to log in
How to return the output of std::cout to the very beginning?
The two functions are called in turn. In the first function, the console output is wrapped to the second line.
In the second function, the word will be displayed already on the second line. Can I somehow return the output to the first line in the second function? To have the word "Map" in the first line. Is this realistic without clearing the entire console?
#include "pch.h"
#include <iostream>
using namespace std;
int drawBorder();
void drawMap();
int main()
{
drawBorder();
drawMap();
}
int drawBorder()
{
cout << "Border";
cout<<endl;
return 0;
}
void drawMap()
{
// выведется на второй строке
cout << "Map";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question