error: expected unqualified-id before 'if'

thanks it worked XD