Now I am making the login and signup app for my guessing number game. I did it all and with no bugs to report at all! I was excited; all that typing and no errors, but when I ran it... it ran fine. LOL There is one spot though. It checks to see if the username they entered is the same as the "loginid" from when they signed up. I have tried it many times using "1" as the username and it always sais that it is not correct. I will leave a note where this shouldn't be happening.
Code:
#include<iostream>
#include<fstream>
#include<cstring>
#include<string>
using namespace std;

void main()
{
	char ready, alreadyup, correct;
	string username, pass;
	int work = 1;
	void play();
	string loginid, signpass;
	cout<<"Welcome to Devon's amazing guess a number game!\n";
	cout<<"Are YOU ready... Yes or No?\n";
	cin>>ready;
	if(ready == 'y')
	{
		do
		{
		cout<<"Have you already signed up? Yes or No?\n";
		cin>>alreadyup;
		if(alreadyup == 'y')
		{
			cout<<"Enter your username exactly as you put it: ";
			cin>>username;
			ifstream login("username");
			if(loginid != username)   //This always happens
			{
				cout<<"Just as I thought! You aren't even signed up!\n";
				work = 0;
				login.close();
			}
			if(loginid == username)   //This isn't happening
			{
				cout<<"Wow, you weren't lying! Now enter your password...: \n";
				cin>>pass;
				if(pass != signpass)
				{
					cout<<"wrong password\n";
					work = 0;
				}
				if(pass == signpass)
				{
					cout<<"Welcome "<<username<<". Now you are ready to play!";
					
				}
			}
		}
		if(alreadyup == 'n')
		{
			cout<<"Well then, nows the time!\n";
			do
			{
			cout<<"Please choose a username: ";
			cin>>loginid;
			cout<<"\nIs this correct? Yes or No? ";
			cin>>correct;
			}
			while(correct == 'n');
			cout<<"Your final choice is "<<loginid<<".\n";
			cout<<"Now enter your password: ";
			cin>>signpass;
			cout<<"Your information has been saved...";
			ofstream signup("username");
			signup<<loginid;
			signup<<"\n";
			signup<<signpass;
			system("PAUSE");
			system("cls");
			main();
		}
		}
		while(work == 0);
	}
}
Please help, and when it is done, I will post the full source for you to compile and run for your enjoyment! wooooohooooooo a noobs game! sweeeet!