I am trying to create a program that auto formats my f:\ (USB Drive), and I have this code so far:
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <iostream>
int main ()
{
system ("format f:");
system("pause");
return 0;
}
Now, when I run that, it comes up, with me needing to press Y, then Enter. How can I simulate that?