Millions of Americans sweltered in stifling heat and humidity Thursday, with dangerous temperatures expected to hit swaths of densely populated areas through the Fourth of July holiday weekend.