Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

C/ char,strcmp,strlen,shellexecute examples

Newbie Spellweaver
Joined
Oct 21, 2010
Messages
7
Reaction score
0
ShellExecute, horrible idea. Too resourceful and too limited. Use CreateProcess instead, allowing you to place command line arguments.
Also, this is wrong.
Code:
scanf("%s",&username); 
printf("You pass:\n"); 
scanf("%s",&password);
You don't need the reference of username, and password since both username and password are all ready pointers.
You also don't need system("Pause"), again too resourceful. Halts execution, calls the OS(Yes it is OS dependant) Creates a shell, the shell finds the PAUSE, allocates memory for the shell, executes the shell, deallocates, returns, runs.
This will do fine.
Code:
char c;
scanf("%c",&c)//Anhalten
Instead of casting check to unsigned, could have just done unsigned int checksize = strlen(username);
Other than that, glad you chose C and not C++.
 
Last edited:
Back
Top