This is only partially completed but works thus far, my only question is what is causing the extra 0 to appear before my points when the program is ran? I can't figure it out. Also, Ill be using an If/Else statement to trigger another response depending on the users choice, should I put it in the switch or just after it
//This program is designed to employ practical use of the switch function by checking the available points the player inputs and if the player has enough to buy the item selected
#include <iostream>
using namespace std;
int myPoints;
int main()
{
cout<<"Please enter your points:"<<myPoints<<"\n";
cin>>myPoints;
cout<<"Please select the ship you would like to upgrade to:\n";
cout<<"\n1 - Cruiser - 185 resource points\n";
cout<<"2 - Destroyer - 590 resource points\n";
cout<<"3 - Battleship - 1025 resource points\n";
int choice;
cout<<"\nChoice: ";
cin>>choice;
switch (choice)
{
case 1:
cout<<"You picked the Cruiser class upgrade"<<"\n\n";
break;
case 2:
cout<<"You picked the Destroyer class upgrade"<<"\n\n";
break;
case 3:
cout<<"You picked the Battleship class upgrade"<<"\n\n";
break;
default:
cout<<"You've made an invalid selection\n";
well that makes perfect sense, it just adds one 0 then, but I don't want any, I want the value of myPoints to be decided by the user, so what did I do wrong?