Code for an exhaust vent next to a window

I'm remodeling a simple 3 piece bathroom. It has a window in the middle but no exhaust fan. I want to put the exhaust fan on the exterior wall, so it's a simple install. But it will be within 1' from the window. Some HVAC guys told me code is that a vent has to be 3' from a window. I could see that for a sewer/furnace vent. Does this 3' code apply to an exhaust fan that will be blowing moisture?

I don't know if a HRV is any different but my inspector was concerned that I stay away from the window so I don't think it is just for sewer or appliance exhausts. Can you go ceiling mounted and exhaust through the soffit or through the roof?

A ventilation exhaust fan vent is an entirely different thing from either a fuel-burning appliance vent or a plumbing vent.
I've never heard of any regulations in any code for the location of ventilation outlets. Exhaust fans are sometimes incorporated
into the structure of window assemblies. I guess some people just get confused with the multiple meanings of the word "vent".

There are specific definitions for each code book. In the mechanical code book (for VA), the meaning of "vent" is specific to fuel burning flues. The clearance here for those is 4' horizontal or below or 1' above. Besides, you can usually bypass the fan requirement in the bathroom if it has a window, so it wouldn't make any sense that you couldn't put the vent near the window as either of them would carry the same air.