I am very new to C++, I am trying to make use of an existed class, So I have created my main method and trying to call the code existed using the header file and a method call..
The code is attached.
I think I have a linking error, cz I am not calling the method in a right way.
// if there are no adapters, print an error
if( allAdapters == NULL )
{
printf( "\nNo adapters found! Make sure WinPcap is installed.\n" );
return 0;
}
// print the list of adapters along with basic information about an adapter
int crtAdapter = 0;
for( adapter = allAdapters; adapter != NULL; adapter = adapter->next)
{
printf( "\n%d.%s ", ++crtAdapter, adapter->name );
printf( "-- %s\n", adapter->description );
}
printf( "\n" );
// free the adapter list
pcap_freealldevs( allAdapters );