Hi, Hello & Good Afternoon

I've got a question and the answer maybe simple or right under my nose but i can't see a solution. my issue is with the following;

Buckys C++ Programming Tutorials - (68, 69) 70 - Reviewing the Final Program

I followed Bucky to the dot and it dot not work, i had to make certain additions just to get it to run as the version of code block I am using is 13.12.

okay here's the deal;

when i run the program everything thin works perfectly till i enter 2 or 3. it doesn't display the correct info does it real display anything apart from the menu, same as the start of the program. I can't find Bucky's as he states on the video. Here 's my code;

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int getWhatTheyWant();
void displayItems(int x);
// main function
int main(){
    int whatTheyWant;
        whatTheyWant = getWhatTheyWant();
    while (whatTheyWant !=4 ){
                case 1:
                case 2:
                case 3:
        whatTheyWant = getWhatTheyWant();

//get what they want
int getWhatTheyWant(){
    int choice;
    cout <<"1 - plain items"<< endl;
    cout <<"2 - helpful items"<<endl;
    cout <<"3 - harmful items"<<endl;
    cout<<"4 - exit program"<<endl;
    return choice;
//display items function
void displayItems(int x){
ifstream objectFile("objects.txt");
string name;
double power;

if (x==1)
while (objectFile >> name >> power){
        cout << name << ' ' << power <<endl;
    if (x==2)
while (objectFile >> name >> power){
        cout << name << ' ' << power <<endl;
    if (x==3)
while (objectFile >> name >> power){
        cout << name << ' ' << power <<endl;

Thank you ever so much for your time and input.