//*************************************************************** // From the book "Win32 System Services: The Heart of Windows 98 // and Windows 2000" // by Marshall Brain // Published by Prentice Hall // // Copyright 1995, by Prentice Hall. // // This code creates a new directory. //*************************************************************** // dircreat.cpp #include #include void main() { char s[MAX_PATH]; BOOL success; // get name of directory cout << "Enter path/name of new directory: "; cin >> s; success = CreateDirectory(s, 0); if (!success) cout << "Error code = " << GetLastError() << endl; else cout << "success.\n"; }