#include <stdio.h>
#include <memory.h>
struct f
{
int *K;
};
void f_Constructor( int Init, f *This ) // Error here.
{
if( This == NULL )
{
// Failed.
return;
}
if( This -> K != NULL )
{
// Build the member.
This -> K = ( int * )malloc( sizeof( int ) );
}
// Finished.
return;
}
void f_Destructor( f *This )
{
if( This == NULL )
{
// Failed.
return;
}
if( This -> K != NULL )
{
// Delete the memory.
free( This -> K );
This -> K = NULL;
}
}
int main( )
{
printf( "This is my first solid C program.\n" );
return 0;
}
Errors
expected deceleration specifiers or '...' before 'f'
Any ideas what this error means? Bare in mind that I haven't been programming in C for no more than 2 hours.