Home Forums C Programming Pointer to a Vargs function Reply To: Pointer to a Vargs function

#3317
shalizy
Participant

What’s the problem!!!!!

int  MyPrint( . . .  )
{
   cout<<" Inside MyPrint"<<endl;
}
int (*ptr2MyPrint ) ( . . . );

int main()
{
  ptr2MyPrint = Myprint;
  (ptr2Myprint) ( 2, 3, "Hi");
 (ptr2Myprint) ( "ImFine", 13, 3.65,"Hello");
 (ptr2Myprint) ( 2.78);
 
  return 0;
}

It’s working!!!!!

  • This reply was modified 7 years, 4 months ago by M. Saqib.
  • This reply was modified 3 years, 9 months ago by M. Saqib.
  • This reply was modified 3 years, 9 months ago by M. Saqib.