Hello, My friend is learning c++ and is making a test program, but he can't get it work right, here is the code. #include <iostream> #include <ctime> #include <stdlib.h> #include <string> #include <windows.h> using namespace std; int main( void ); class Gun { //data member declarations string color; bool draw; bool lock; int numOfBullets; public: Gun(string aColor); //constructor ~Gun(); //destructor //methods void drawn(); void locked(); int fire(); }; Gun::Gun(string aColor) { numOfBullets = 10; draw = false; lock = false; color = aColor; srand((unsigned)time(0)); //seeds the time (we need the rand() function in the fire() method) } Gun::~Gun() { } //draws the gun void Gun::drawn() { if(lock) { cout<<"gun has been locked and therefore cannot be loaded.\n"; } draw = true; cout<<color<<"gun has been loaded.\n" <<endl; } //locks the gun void Gun::locked() { if(!draw) { cout<< color << "gun has not been drawed.\n" <<endl; } if(draw) { lock = true; cout<<color<<"gun has been locked.\n" <<endl; } } //fires the gun if locked int Gun::fire() { if(!draw) { cout<< color << "gun has not been loadedand therefore could not fire.\n" << endl; return 0; } int score; score = rand() % (10 - 0 + 1) + 0; if(score == 0) cout<<color<< " missed the target!!!\n" <<endl; else cout<< color << " scored " << score << " points!!!\n" <<endl; return score; } //the main function int main(void) { int go; char load; char lock; system("cls"); cout<<"Gun Control - TS Software V1.0\n\n"; cout<<"Welcome to gun control!\n\nToday you will learn how to aim, draw, and fire a gun at" " a target. Good Luck!\n"; Sleep( 1000 ); cout<<"\nGlad you agreed. Come on over.\n\n"; cout<<"Ok, now we are going to use the nice, pretty old, black shotgun.\n\n"; Gun shotgun("The old, black shot"); cout<<"To load the shotgun type in load. You will then be told that is loaded.\n"; cin>>load; cout<<"\n"; if (load = load) { shotgun.drawn(); } cout<<"Then you would have to lock it, type in lock.\n"; cin>>lock; if (lock = lock) { shotgun.locked(); } /*shotgun.draw(); shotgun.fire(); shotgun.loced();*/ return 0; } Though I don't know c or c++ I think that the main problem is the if statements, I have read a few tutorials recently and it looks like the if statement isn't working. Shouldn't the if statements have two equal signs? And even then it looks like it is comparing the variable against itself and that would always be true, well, those are just my ideas, I don't know enough to fix it, but I thought that someone here would! Thanks In Advance! Zach Doty