Made some progress but still need help.
Code:
// Professor.cpp : The entry point for the console application.
#include <iostream>
#include <string>
#include <windows.h>
#include <stdlib.h>
using namespace std;
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD CursorPosition;
void printXY(int x, int y, string text);
void gotoXY(int x, int y, string text);
int main()
{
string Professor[]=
{" "
," _.-\"""""\"\"""""\"-._ "
," /.-......-.\\ "
," // \\ "
," || || "
," ||./\\ /\\.|| "
," /` ** || ** '\\ "
," \\ /\\ / "
," | (__) | "
," | ,____, | "
," \\ `--' / "
," _./`'.____.'`\\._ "
," _.-' \\ \\ / / '-._ "
," / \\ `\\/` / \\ "
," / \\./ \\./ \\ "
," / \\ "
," "};
char holder = ' ';
int len, x, y;
len = Professor[0].length();
do{
for (y=0;y<17;y++)
{
gotoXY(17,1+y,Professor[y]);
}
for (y=0;y<17;y++)
{
holder = Professor[y][len];
for (x=len;x>0;x--)
{
Professor[y][x]=Professor[y][x-1];
}
Professor[y][0]=holder;
}
Sleep(120);
}while(true);
system("PAUSE");
return 0;
}
void printXY(int x, int y, string text)
{
CursorPosition.X = x;
CursorPosition.Y = y;
SetConsoleCursorPosition(console,CursorPosition);
cout << text;
}
void gotoXY(int x, int y, string text)
{
CursorPosition.X = x;
CursorPosition.Y = y;
SetConsoleCursorPosition(console,CursorPosition);
cout << text;
}