if you wanna do it in a standard way, you could create a string, output it, change it, clear it with with backspaces and spaces ('\b' and ' '), and then re-write it.
it's VERY processor intensive though.
edit: I got bored:
Code:
#include <iostream> //for console I/O
#include <string> //for the stl string class
#include <ctime> //for a timer
void wait(const int clocks); //a timer to slow things down
int main()
{
std::string line1; //the first word
std::string line2; //the second word
std::string show; //what gets shown on the screen
int l; //the amount of spaces on the left
int r; //the amount of spaces on the right
int m; //the amount of spaces in the middle
std::cout<<"Enter the first word: "; //ask for the first word
getline(std::cin,line1,'\n'); //get the first word
std::cout<<"Enter the second word: "; //ask for the second word
getline(std::cin,line2,'\n'); //get the second word
for(m=50,l=0,r=0; m>0; m-=2,l++,r++) //loop, decreasing space between
{ //and increasing egde space
show.assign(l,' '); //put the left spaces in
show.append(line1); //put the first word in
show.append(m,' '); //put the middle spaces in
show.append(line2); //put the second word in
show.append(r,' '); //put the right spaces in
for(register int i=show.length();i>0;i--)
{
std::cout<<"\b \b"; //delete the previous line
}
std::cout<<show<<std::flush; //write this line
wait(100000); //wait 100000 clock cycles
}
std::cout<<std::endl; //you may need std::cin.get()
return 0; //return 0
}
void wait(const int clocks) //a timer to slow things down
{
time_t start=clock(); //get the current clock time
while(clock()-start<clocks) {}; //loop until time has elapsed
}
it doesn't have them cross paths, because that's not really something you'll be able to do unless you get creative (maybe putting spaces in between each letter of both words and adding a new method to handle the crossover), but that's alot more work than I'm willing to do now