I did this in college. It worked out fine.
Actually, since my parents were willing to pay for my schooling, I convinced them that instead of throwing away rent money, to go ahead and buy a small house. They agreed and did. They liked it because the mortgage payment was their only expense. I worked for my part of the expenses and collected the rent from my roommate and paid the bills. I made a couple of extra bucks every month to keep me in beer money.
Here is my one peice of advice: Location, location, location.
Don't buy a house near campus. The only people you will be able to resell to are other college people.
If you buy in a family neighborhood say, 15 to 20 minutes from campus you stand a much greater chance of making money at resale time.
You do not want to be so close that your place will be used as a 'crash pad'. You should be barely able to make it home and back between 1 class. This will make you stay at school and study instead of wasting your time driving home for a sandwich. It will make you more responsible for your time.
There will be plenty of roommates that want to stay in a nice house instead of a loud apartment complex. If you live far enough away, you will get someone who is responsible about their time management and will appreciate the distance.
Don't take the first roommate that comes along. Better to have to pay the payments yourself than to have to deal with some deadbeat, asshole roommate crisis during finals.
If people know they have to drive 20 minutes home they are less willing to come to your house for a 'kegger'. All the better.
Chicks dig it.
Good Luck