I want to change my character drawing to other characters other than #. How do I change it without having to make a new board for the new character? other than that i also want to compile the program so it can be horizontal I am planning to use 'if else' statement but not sure whether or not it can be done.
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
void display( string displayBoard[][ 7 ], int row);
void clearScren();
void delay();
int main()
{
string letter;
string displayBoard[ 7 ][ 7 ];
cout << "Enter a letter or number:\n";
getline(cin, letter);
for (int i = 0; i < letter.length(); ++i)
{
switch (letter[i])
{
case 'c' :
case 'C' :
for (int a = 0; a < 1; ++a)
{
displayBoard[ 0 ][ a ] = " #### ";
displayBoard[ 1 ][ a ] = " # #";
displayBoard[ 2 ][ a ] = " # ";
displayBoard[ 3 ][ a ] = " # ";
displayBoard[ 4 ][ a ] = " # ";
displayBoard[ 5 ][ a ] = " # #";
displayBoard[ 6 ][ a ] = " #### ";
display( displayBoard, 7);
}
break;
case 'd' :
case 'D' :
for (int a = 0; a < 1; ++a)
{
displayBoard[ 0 ][ a ] = " ##### ";
displayBoard[ 1 ][ a ] = " # #";
displayBoard[ 2 ][ a ] = " # #";
displayBoard[ 3 ][ a ] = " # #";
displayBoard[ 4 ][ a ] = " # #";
displayBoard[ 5 ][ a ] = " # #";
displayBoard[ 6 ][ a ] = " ##### ";
display( displayBoard, 7);
}
break;
}
}
return 0;
}
void display( string displayBoard[][ 7 ], int row )
{
for( int i = 0; i < row; ++i )
{
for( int j = 0; j < 7; ++j )
{
cout << displayBoard[ i ][ j ];
}
cout << endl;
}
delay();
clearScren();
}
void delay()
{
for( int i = 0; i < 300000000; ++i )
{ }
}
void clearScren()
{
system( "cls" );
}