I can't figure out why this code isn't working. Plz help!

Category: visual studio visualiaztion

Question

Jon_BL on Sun, 15 Nov 2015 19:45:25


Why this not work:

#include "stdafx.h"
#include <iostream>
#include <math.h>
#include <string>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	_Start();
}
void _Q1(string var){
	cout << "What is the 1st root of 1?" << endl;
	cin >> var;
	if (var == "1"){
		cout << "CORRECT" << endl;
		_Q2(var);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Start();
	}
}
int _Start(){
	string var;
	cout << "Type and enter in Y to play, or N to quit." << endl;
	cin >> var;
	if (var == "Y"){
		_Q1(var);
	}
	else if (var == "N"){
		cout << "Okay, bye! :(" << endl;
		return 0;
	}
	else if (var == "y"){
		_Q1(var);
	}
	else if (var == "n"){
		cout << "Okay, bye! :(" << endl;
		return 0;
	}
	else{
		cout << "Bye annoying person!" << endl;
		return 0;
	}
	return 0;
}
void _Q2(string var){
	int var2 = 3 ^ 3;
	cout << "What is 3^3?" << endl;
	cin >> var;
	if (int var = var2){
		cout << "CORRECT!" << endl;
		_Q3(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Start();
	}
}
void _Q3(int var, int var2){
	cout << "CHEKCPOINT!" << endl;
	var2 = sqrt(25);
	cout << "What is the square root of 25?" << endl;
	cin >> var;
	if (var = var2){
		cout << "CORRECT!" << endl;
		_Q4(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q3(var, var2);
	}
}
void _Q4(int var, int var2){
	var2 = 8 - sqrt(sqrt(8 + 8));
	cout << "What is 8 - the sqrt of the sqrt of 8 + 8?" << endl;
	cin >> var;
	if (var = var2){
		cout << "CORRECT!" << endl;
		_Q5(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q3(var, var2);
	}
}
void _Q5(int var, int var2){
	var2 = 5 + 7 * 8 - 5 ^ 2 / (9 - 4);
	cout << "What is 5 + 7 * 8 - 5 ^ 2 / (9 - 4)?" << endl;
	if (var = var2){
		cout << "CORRECT!" << endl;
		_Q6(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q3(var, var2);
	}
}
void _Q6(int var, int var2){
	cout << "CHECKPOINT!!" << endl;
	string var2 = "0.12";
	cout << "What is sin(1)? (Rounded.)" << endl;
	cin >> var;
	if (var = var2){
		cout << "CORRECT!" << endl;
		_Q7(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q6(var, var2);
	}
}
void _Q7(int var, int var2){
	string var2 = "0.996";
	cout << "What is cos(5)? (Rounded.)" << endl;
	cin >> var;
	if (var == var2){
		cout << "CORRECT!" << endl;
		_Q8(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q6(var, var2);
	}
}
void _Q8(int var, int var2){
	string var2 = "-5.67";
	cout << "What is tan(100)? (Rounded.)" << endl;
	cin >> var;
	if (var == var2){
		cout << "CORRECT!" << endl;
		_Q9(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q6(var, var2);
	}
}
void _Q9(int var, int var2){
	cout << "CHECKPOINT!" << endl;
	string var2 = "1.79";
	cout << "What is In(6)? (Rounded.)" << endl;
	cin >> var;
	if (var == var2){
		cout << "CORRECT!" << endl;
		_Q10(var, var2);
	}
	else{
		cout << "INCORRECT!" << endl;
		_Q9(var, var2);
	}
}
void _Q10(int var, int var2){
	cout << "If you fail this you go back to Question 1." << endl;
	string var2 = "80.54";
	cout << "What is tan^-1(6) (Rounded.)" << endl;
	cin >> var;
	if (var == var2){
		cout << "CORRECT!" << endl;
		_Finale();
	}
	else{
		cout << "INCORRECT!" << endl;
		string var;
		_Q1(var);
	}
}
int _Finale(){
	cout << "You did it! Good Job!" << endl;
	cout << "Ur really smart!" << endl;
	string fin;
	cout << "Did you use a calculator? (Y or N)" << endl;
	cin >> fin;
	if (fin == "Y"){
		cout << "HE'S FRIPPIN' CHEATING! AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!" << endl;
		_Start();
	}
	else if (fin == "N"){
		cout << "U hav proven ur smartz!" << endl;
		cout << "Good bye! :(" << endl;
		return 0;
	}
	else{
		cout << "I do not underthand..." << endl;
		_Finale();
	}
}

When I look through the code there aren't any errors. Then I run it and it picks up 27 errors and 3 warnings.

PLZ HELP ME!