This program is a mess. It does not include the necessary headers, count should be cout and end1 should be endl, and int main (void) should really be int main().
If all that is fixed, this program creates an object of type derived and calls its foo function.