Ike supposedly had an affair with his driver during the height of WW2, and he didn't resign. JFK was a womanizer/sex addict, and he didn't resign. Bill Clinton, ditto and ditto.
Then why the sudden resignation of General Petraeus?
And does this mean we can expect the president to resign if he's ever caught doing the extra-marital horizontal mambo? (As if!)