I
info
Hello World,
The code below compiles without warnings and the resulting program runs
without any error.
....somehow I am not sure if I should do something like this and/or if
there are any dangers...
Any comments?
#include <stdio.h>
void Func1()
{
printf("func1\n");
return;
}
void Func2()
{
printf("func2\n");
return;
}
void Func3()
{
printf("func3\n");
return;
}
void StartFunctions( void (*f)(void) )
{
printf("Starting Function...\n");
f();
return;
}
int main()
{
char i;
void *v[] = { (void*)Func1, (void*)Func2, (void*)Func3 };
for ( i = 0; i < 3; i++ ) StartFunctions( v );
return 0;
}
The code below compiles without warnings and the resulting program runs
without any error.
....somehow I am not sure if I should do something like this and/or if
there are any dangers...
Any comments?
#include <stdio.h>
void Func1()
{
printf("func1\n");
return;
}
void Func2()
{
printf("func2\n");
return;
}
void Func3()
{
printf("func3\n");
return;
}
void StartFunctions( void (*f)(void) )
{
printf("Starting Function...\n");
f();
return;
}
int main()
{
char i;
void *v[] = { (void*)Func1, (void*)Func2, (void*)Func3 };
for ( i = 0; i < 3; i++ ) StartFunctions( v );
return 0;
}