Trying to Learn

the following is my code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <fstream>
#include <iostream>
#include <cstring>  

using namespace std;

int main()
{
  char str[10];
  char name[50];
  char pass[50];
  ofstream a_file ( "example.txt" , ios::app);
    do { cout<<"Please enter your name: ";
  cin.getline ( name, 50 );
   if ( strcmp ( name, name? ) == 0 ) \\ the second name needs to be called from the text file allready created
  cout<<"This User has account already.\n";
  } while ( strcmp ( name, name? ) == 0 );
  a_file<< "Username: " << name << "\n";
  cout<<"Please enter your password: ";
  cin.getline (pass, 50 );
  a_file<< "Password: " << pass << "\n";
  a_file.close();
  ifstream b_file ( "example.txt" );
    cout<<"Regestered new Account!\n"; 
  cin.get();   
} 
closed account (z05DSL3A)
And..........

http://www.cplusplus.com/forum/beginner/1/
Topic archived. No new replies allowed.