//Print images and show to user all the options.
char selectionimage;
cout<< "Image A: \n";
Image_Logo(Car1,6);
cout<<"Image B: \n";
Image_Logo(Car2,6);
cout<<"Image C: \n";
Image_Logo(Car3,6);
cout<<"Image D: \n";
Image_Logo(Car4,6);
cout<<"Image E: \n";
Image_Logo(Car5,6);
cout<<"\n\nEnter: ";
do
{
falseflag=false;
cin>>selectionimage;
switch(selectionimage)
{
case'a':
//Copy this array if user enters in a.
break;
case'b':
break;
case'c':
break;
case'd':
break;
case'e':
break;
default:
cout<<"Enter Again: ";
falseflag=true;
}
}
while(falseflag);
meanwhile, I'm making this certain function where if the user choose a I want that string constant image to be my parameter. I'm struggling how to do that. For instance, suppose user choose option a. Well if user chooses option a, then I will use a function that will have Car1 as my parameter. Can someone be willing to help me on this matter? THANKS for your time! :)
As you can see, I have const string carimages for the parameters. So if the user chooses option a, I want to use carimage 1 as an array. Also, not I have four more other images, which could be stored in this parameter if user picks something else.
What my assimgnst asks is to let the user choose a border and a logo. Once I have chosen that, I will print out a banner with the logo and words inside... :)
//use this function to find the length of the string image and print the horizontal line
void sizedetermineofborder(string usertyped, const string carimages[],int rowofcar, char borderselection)
{
if (borderselection=='a')
{
//print the top part of boundary border
for(int i=0;i<carimages[0].length();i++);
{
cout<<(char)(196);
}
cout<<(char)(191);
//Print next row and the logo too
for(int i=0;i<CARSIZE;i++)
{
cout<<"\n";
cout<<(char)(179)<<carimages[i]<<(char)(179);
}
//Draw the bottom border
cout<<endl;
cout<<(char)(192);
for(int i=0;i<carimages[0].length();i++)
{
cout<<(char)(196);
}
cout<<(char)(217);
}
//If border two is selected
elseif (borderselection=='b')
{
for(int i=0;i<CARSIZE;i++)
{
//horizontalline
cout<<(char)(247);
}
//top right
cout<<(char)(248);
//Print next row and the logo too
for(int i=0;i<CARSIZE;i++)
{
cout<<"\n";
//vertical
cout<<(char)(244)<<carimages[i]<<(char)(244);
}
//Draw the bottom border
cout<<endl;
cout<<(char)(248);
for(int i=0;i<carimages[0].length();i++)
{
cout<<(char)(247);
}
cout<<(char)(248);
}
elseif (borderselection=='c')
{
for(int i=0;i<carimages[0].length();i++)
cout<<(char)(205);
cout<<(char)(187);
}
elseif(borderselection=='d')
{
for(int i=0;i<carimages[0].length();i++)
cout<<(char)(176);
cout<<(char)(176);
}
}
This is my updated function; therefore knowing how to convert that option a from user into an image is critical for me :(