I have to create these image for a program and The program should be able to show the user the 5 options and let the user select one of the images. I already have the images created but i dont know how to put them in the option for the user to choose. this is what I have so far. plz help
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <fstream>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <windows.h>
using namespace std;
//Draw the 5 images. 5 is the number of the images. 11 is the number of rows in that image.
const int IMGS[5][11] = {}
int select;
cout<<"\t\t\tMenu\n\n"
cout <<"press 1 to select image 1\n";
cout <<"press 2 to select image 2\n";
cout <<"press 3 to select image 3\n";
cout <<"press 4 to select image 4\n";
cout <<"press 5 to select image 5\n";
cin>>select;
//then you could do a switch statement or if statement to print out the image the user selected
switch(select)
{
case 1: //print the 1st image
break;
case 2: //print the 2nd image
break;
case 3: //print the 3rd image
break;
case 4: //print the 4th image
break;
case 5: //print the 5th image
break;
}
i think this is what you are looking for
hope it helps
int select;
cout<<"\t\t\tMenu\n\n"
cout <<"press 1 to select image 1\n";
cout <<"press 2 to select image 2\n";
cout <<"press 3 to select image 3\n";
cout <<"press 4 to select image 4\n";
cout <<"press 5 to select image 5\n";
cin>>select;
for(int i=0;i<11;i++)
{
cout<<IMGS[select][i];//Prints up to 11 lines of your strings (0-10);
}
Something of that sort... although it has been solved already, I've just wanted to indicate that there were other means possible other than a switch; but switches are perfectly fine as well.