I have an assignment to make a code that saves your username for a game. When I write what my username is, the only thing that is written in the .txt file is "0". Can someone help me?
#include <iostream>
#include <fstream>
using namespace std;
int main () {
long long username;
cout<<"What is your name: ";
cin>>username;
ofstream myfile;
myfile.open ("register.txt");
myfile << username;
myfile.close();
return 0;
}