Code:
// if_statements
// Program uses an if statement to have the user choose a specific selection
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int selection;
int storage[3];
storage[0] = 1;
storage[1] = 2;
storage[2] = 3;
/*Opening Statement*/
std::cout << "This program utilizes an if statement to select a number"; cin.get();
std::cout << "Please select the number 1" << endl;
istream &get (int& selection);
if (selection = storage[0])
std::cout << "Good job smartass, you can read";
else
{
std::cout << "Holy ........, your really stupid, arn't you? you cant even take simple directions? go away."
<< endl << "Error 01: Your to stupid";
return 0;}
return 0;
}
My problem is that
Code:
istream &get (int& selection);
Isnt working... am I using it wrong? im trying to get the program to take in an answer and store it in int selection...