As I under stand you want to call function from function b but not use the normal a() method to call. Correct?
Well you could call using a pointer to the function. I do not have access to a compiler here but the code would look something like this:
static void a(char message);
void (*ptr2a)(char) = a;
static void b(void );
void main( )
{
for(int x = 0; x < 2; ++x)
{
switch(x)
{
case 0 : A((char)"Good Morningn");
cycle;
case 1 : B();
cycle;
}
}
}
void a(char message)
{
printf("%s",message);
}
void b(void)
{
ptr2a((char)"and good night n");
}
Well you could call using a pointer to the function. I do not have access to a compiler here but the code would look something like this:
static void a(char message);
void (*ptr2a)(char) = a;
static void b(void );
void main( )
{
for(int x = 0; x < 2; ++x)
{
switch(x)
{
case 0 : A((char)"Good Morningn");
cycle;
case 1 : B();
cycle;
}
}
}
void a(char message)
{
printf("%s",message);
}
void b(void)
{
ptr2a((char)"and good night n");
}