0

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

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by Moschops
0

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()

0

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.

Edited by Zssffssz: Autocorrect

0

PS How would I setup virtual memory in linux?
Muffins

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

0

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).

Edited by Moschops: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.