home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
OTHERUTI
/
MASTER-1.ZIP
/
SOURCE
/
CHAP06
/
CHAP06.LZH
/
FNSPLIT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-06-30
|
720b
|
26 lines
// FNSPLIT.CPP
// Demonstrates use of fnsplit() and fnmerge() functions.
#include <string.h>
#include <dir.h>
#include <iostream.h>
void main(void)
{
char bigname[MAXPATH];
char drivename[MAXDRIVE];
char dirname[MAXDIR];
char filename[MAXFILE];
char extname[MAXEXT];
cout << "Enter a fully qualified filename: ";
cin >> bigname;
fnsplit( bigname, drivename, dirname, filename, extname );
cout << "The filename components are: " << drivename << ", " <<
dirname << ", " << filename << ", and " << extname << "\n";
strcpy( bigname, "" );
fnmerge( bigname, drivename, dirname, filename, extname );
cout << "The reconstructed filename is: " << bigname << "\n";
}