this would be my first time with arrays so i still have no idea how to use it
i'm thinking on using it on this program
#include <iostream>
#include <conio.h>
#include <string.h>
using namespace std;
int main()
{
char main_menu;
char parts;
char items[]; //here's the part i don't know yet
first_page:
cout<<"1 - Buy\n\n";
main_menu = getch();
switch (main_menu) {
case '1':
system("cls");
cout<<"Parts\n\n0 - quadcore\n1 - dual core";
parts = getch();
switch (parts) {
case '0':
strcpy(items[],"Quadcore"); // assignment of a constant string to a variable
break;
case '1':
strcpy(items[],"Dual Core");
break;
default:
cout<<"\n\nInvalid";
break; }
break;
default:
goto first_page;
break; }
return 0;
}
this program is not yet done obviously (not to mention it does not work,yet)
how do i use these "arrays" in this program together with the strcpy?
what i want to happen is the program will display at the end what the user bought
for example:
You Bought:
Quadcore
Dualcore
Quadcore