Below is the code I wrote, for taking the arrow key imput, just wanted to share it and get some feedback thanks :)
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int number = 0;
int number2 = 0;
while(true)
{
int arrow = getch();
if (arrow == 77)
{
number = number + 1;
system("cls");
for (int i = 0; i < number2; i++)
{
cout << endl;
}
for (int i = 0; i < number; i++)
{
cout << " ";
}
cout << "*" ;
}
if (arrow == 80)
{
number2 = number2 + 1;
system("cls");
for (int i = 0; i < number2; i++)
{
cout << endl;
}
for (int i = 0; i < number; i++)
{
cout << " ";
}
cout << "*" ;
}
if (arrow == 75)
{
number = number - 1;
system("cls");
for (int i = 0; i < number2; i++)
{
cout << endl;
}
for (int i = 0; i < number; i++)
{
cout << " ";
}
cout << "*" ;
}
if (arrow == 72)
{
number2 = number2 - 1;
system("cls");
for (int i = 0; i < number2; i++)
{
cout << endl;
}
for (int i = 0; i < number; i++)
{
cout << " ";
}
cout << "*" ;
}
}
}