The 'easy' answers already asked have been tried over the years, many times. As others have indicated, these simple ideas of just offering a warm place to sleep doesn't work. The problem is so much more complicated than that. You have many different reasons people are in these conditions. Some are mentally ill and cannot think clearly about their situation. We don't have state run asylum's anymore where these people were cared for, they (our government) just turned them out on the street with no fallback plan. Granted the asylums did not treat the people as most people thought they should, but they did the best they could with the funding they had. I toured one of these places in Colorado many years ago, it was hard to see, but they all had beds, food, clean clothes and showers. Not all took advantage of what was available but was better than living under the freeway in cardboard boxes and they had no access to illegal drugs or alcohol.
I also spent time at a homeless shelter in Denver, Colorado working with the Manager. Anyone could check in, if they had room available, but the second night was not offered unless they stayed 'sober' no drugs or alcohol in their system. When they checked in every day, they were checked. Many only had one night with them. A few made it a few nights, very few made it a month. They did rehab people who really wanted to get back to a normal life, but most did not really have the resolve to stay the course. My conclusion was that most of the people who are homeless are addicted to drugs/ alcohol. They choose to stay addicted, as many programs to help them with addiction and provide food, shelter, and in time a job, are available in all big cities. They just have given up and their addition is all they have left! Sad but true! Not that we should not continue to offer help, as some will wake up and decide to crawl out of the gutter, but sadly many will die before they awaken!