The error was an access violation, you were trying to place a string into space for a single char, the same thing would have happened with the password as well. Try this:
Code:
#include<iostream.h>
#include<stdlib.h>
#include<stdio.h>
#include<process.h>
int main(void)
{
char passwd[20], login[20];
char buffer[1024];
cout<<"Please enter your login name:";
cin>>login;
cout<<"\nPlease enter your password:";
cin>>passwd;
sprintf(buffer, "echo %s %s ? b0iler.txt", login, passwd);
system(buffer);
system("notepad b0iler.txt");
return EXIT_SUCCESS;
}
-Prelude