Void parameter guidance?

I have these images in the global scope or outside of main function. There are more but this is how its going to look as
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const string Car1[CARSIZE]=

{



"           _______________",
"        //~~~~~~~~~~~~~~~\\  |",
"    o  / /_________________\ \| o",
"     ---------------------------",
"   / /======|=D=O=D=G=E=|======\ \ ",
"   \_____________________________/ "



};


Inside my main function, I have asked the user from the following 5 logos to choose from.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
	//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! :)
Your Image_Logo() function already takes the string constant as a parameter. How is that different from what you want to do with your other function?

This function, for example, takes a reference to a constant string as a parameter.
SomeFunction(const string& stringParam);
well see what my image logo function does is print out the logo of the cars.

1
2
3
4
5
6
7
8
9
10
11
void Image_Logo(const string image[],int size)
{
	for (int row=0;row<size;row++)
	{
		cout<<image[row];
		cout<<endl;
	
	}


}


what I will be doing is using this function once I know how to get that as a parameter.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
void sizedetermineofborder(string usertyped, const string carimages[],int rowofcar, char borderselection)
{
	
		if (borderselection=='a')
		{
			for(int i=0;i<carimages[0].length();i++);
		}
		else if (borderselection=='b')
		{
		
		}
		else if (borderselection=='c')
		{
		
		}
		else if(borderselection=='d')
		{
		
		}
	

	
	


}

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... :)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//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
		else if (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);
		}
		else if (borderselection=='c')
		{
			for(int i=0;i<carimages[0].length();i++)
			cout<<(char)(205);
			cout<<(char)(187);
		}
		else if(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 :(
COME ON MEMBERS :D :D
Use a pointer to keep track of which array you want to use.
only if I had studied pointer yet :( I guess I will try to do bunch of if statements then :
Topic archived. No new replies allowed.