Results 1 to 5 of 5
  1. #1
    Nurples's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    5
    My Mood
    Sneaky

    Post Confused on what to do

    Not sure where I'm going wrong and could use some help


    Code:
    #include <cstdlib>
    #include <iostream>
    #include <time.h>
    #include <string>
    using namespace std;
    
    int main() 
    {
        int guess, number;
        string shoot,point,reply;
    
        srand (time(NULL));
        number = rand() % 6 + 1;
    	system ("color a");
        system("cls");
    
        cout << "Roulette Game"<<endl;
        cout << "********************"<<endl;
        cout<<endl;
        cout<< "There is 1 bullet in the chamber."<<endl;
        cout<< "Type shoot or point."<<endl;
        system("pause");
    
    	cin>> guess;
    	if (shoot == "shoot", "point") 
    	{while(guess != number)
    	{cout<<"you are safe for now."<<endl;
    	system("pause");
    	} 
    	}
    	else
    	{cout<<"You are dead!"<<endl;
    	system("pause");
    	}
    
    
        return 0;
    }

  2. The Following User Says Thank You to Nurples For This Useful Post:

    DaniielSanchez (11-09-2016)

  3. #2
    __readgsqword's Avatar
    Join Date
    Mar 2016
    Gender
    female
    Posts
    39
    Reputation
    10
    Thanks
    13
    You didn't even explain the problems. Other than bad coding habbits, I see one big error here.
    Code:
    if (shoot == "shoot", "point")
    It should be,
    Code:
    if(shoo*****mpare("shoot") == 0 || shoo*****mpare("point") == 0)
    I believe that is what you are trying to do.

  4. The Following User Says Thank You to __readgsqword For This Useful Post:

    DaniielSanchez (11-09-2016)

  5. #3
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by __readgsqword View Post
    You didn't even explain the problems. Other than bad coding habbits, I see one big error here.
    Code:
    if (shoot == "shoot", "point")
    It should be,
    Code:
    if(shoo*****mpare("shoot") == 0 || shoo*****mpare("point") == 0)
    I believe that is what you are trying to do.
    guess.compare, shoot is never initialised or used.
    Ah we-a blaze the fyah, make it bun dem!

  6. #4
    __readgsqword's Avatar
    Join Date
    Mar 2016
    Gender
    female
    Posts
    39
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Hell_Demon View Post
    guess.compare, shoot is never initialised or used.
    Yes, my mistake.

  7. #5
    Nurples's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    5
    My Mood
    Sneaky
    My bad as im sure you can tell im new to all this

Similar Threads

  1. [Help] I'm Confuse dont know whats wrong.
    By gimmestitches in forum WarRock Philippines Hacks
    Replies: 6
    Last Post: 01-21-2013, 12:35 AM
  2. [Solved] i am confused what a Glitches.!!!
    By Greenviper in forum CrossFire Help
    Replies: 1
    Last Post: 08-04-2012, 10:59 PM
  3. [Help Request] What is the addy in Olly ??? Confused
    By Deprimirt in forum C++/C Programming
    Replies: 2
    Last Post: 05-27-2012, 02:33 PM
  4. Replies: 6
    Last Post: 12-08-2008, 12:57 PM
  5. What type of games
    By djraziel127 in forum General Game Hacking
    Replies: 11
    Last Post: 12-30-2005, 03:22 PM