anyone know code so that i have to insert a username into the program before i can continue doing anything else?

Yes. Do you have a console or GUI program. What compiler and operating system. Its basically nothing more than a loop

int main()
{
    std::string username, password;
    bool done = false;
    while( !done )
    {
         // ask for user name and password.  If corect set done to true, otherwise 
         // back to top of loop
    }
}

what is the code for back to top of loop?

I see you have a long way to go before you will be able to complete your program. Here is a tutorial on loops.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.