Also, is your friend using the same operating system and compiler as you?
graphics.h is an old (Borland BGI) thing. You're best not to use it.