Ok how do I make a C++ console app format a floppy disk for a Win or Linux Computer?
I really want it to be auto-matic like without the whole volume tilte, filesystem; that sutff.
PS How would I setup virtual memory in linux? Thanks answer the floppy question first.


Muffins

Use the system command containing the same command you would use to format a floppy.
The volume name and other atributes are controlled through parameters.

You can also use one of the forms of spawn()

Oh sorry got caught up in other threads. What system command would this be? I haven't memorized all the systemcommands yet (and I probably never will). The one for windows please.

PS How would I setup virtual memory in linux?
Muffins

Your in luck, Linux already comes with virtual memory set up.

Under windows, the system function is "system" and the format command from the command line is "format".

Thus,

#include <ctsdlib>
int main()
{
  system("format a: /v:noLabel");
  return 0;
}

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/format.mspx?mfr=true

This is a very clumsy way to automate a command line programme such as format. You'd be better off looking into shell scripts (which I seem to recall are known as batch files under windows).

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.