What happens if she wins the general election but dies before the electoral college officially elects her? Can her electors in the electoral college vote for anyone else who is otherwise qualified to serve as POTUS? What happens if she dies after she is officially elected by the electoral college, but before she takes the oath of office? Under the Constitution, the VP succeeds the POTUS, but Clinton would not be the president until she takes the oath of office.
After the election, but before the meeting of the Electoral College, it is up for grabs, except that states may bind their electors in various ways. Because of various details, Congress might decide on the president just as if no candidate won an electoral majority.
After the official electoral vote count in Congress, it is straightforward: The recently elected VP becomes president.
“If a winning Presidential candidate dies or becomes incapacitated between the counting of electoral votes in Congress and the inauguration, the Vice President elect will become President, according to Section 3 of the 20th Amendment.”
"No President-elect has in fact failed to be sworn in. Nevertheless, the rules for what would happen if a President-elect were to be unavailable to be sworn in actually became a part of our law with the adoption of the 20th Amendment in 1933.
This amendment was passed primarily to shorten the length of time between the general election and the beginning of the new administration (inauguration day was moved from March to January).
But it also specified that if, at the time of the inauguration, the President-elect has died, then the Vice-President-elect becomes President"
So if Hillary wins the election and dies before being sworn in, Kaine becomes President
http://teachinghistory.org/history-content/ask-a-historian/20431