Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\stdafx.h"
- File::File( int pType, char *pPath, char *pFilename, long pSize )
- {
- this->type = (int*)malloc( sizeof(int) );
- this->path = (char*)malloc( 512 );
- this->filename = (char*)malloc( 512 );
- this->size = (long*)malloc( sizeof(long) );
- this->type = (int*)pType;
- strcpy( this->path, pPath );
- strcpy( this->filename, pFilename );
- this->size = (long*)pSize;
- }
- File::~File()
- {
- free( this->type );
- free( this->path );
- free( this->filename );
- free( this->size );
- this->type = NULL;
- this->path = NULL;
- this->filename = NULL;
- this->size = NULL;
- }
Add Comment
Please, Sign In to add comment