Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "sort.h"
- //#define _DEBUG_
- #define _DEBUG2_
- typedef void ( *pF ) ( int *, int );
- clock_t T;
- void InitTab( int*, int );
- void PrintTab( int*, int );
- void Test( pF* pSortFun, const char* pMethodNames[], int N, int* pPat, int nSize );
- int main( int argc, char* argv[] )
- {
- if( argc !=2 )
- {
- printf( "attention: error");
- return 1;
- }
- int nSize = atoi( argv[ 1 ] );
- #ifdef _DEBUG_
- printf ( "Generating Tab of %d elements...\n\n", nSize );
- #endif
- int* pPat = ( int* )malloc( nSize * sizeof( int ) );
- if( !pPat )
- {
- printf( "error: pPat not allocated" );
- return 1;
- }
- memset( pPat, 0, nSize * sizeof( int ) );
- InitTab( pPat, nSize ); //initiation Tab with random numbers
- #ifdef _DEBUG2_
- PrintTab( pPat, nSize );
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement