I am in the 3rd year of my university and I am thinking of a startup but I am afraid if it fails I'll be treated as a guy with no experience after two years or a guy with same experience than anyone who worked in a company?
Honestly - it could go either way.
You are likely to get a broader knowledge working on your startup at the expense of narrow, in-depth knowledge.
From my own point of view this sort of experience would make your CV stand out even if it ultimately fails - it demonstrates get up and go and someone who is likely to do whats needed, rather than just whats asked. (Certainly beats the "I like reading and cinema and blah and blah" you see in most graduate CV's)
For some more 'traditional' corporate jobs it could be a downside - you could be seen as less likely to stay around, less likely to just get on with just the thing your asked to do etc.
It really depends upon your countries culture (e.g. prior business failures is viewed worse in the UK than in the US) and the culture of the companies you apply for.
For me - I wouldn't worry about the negative reaction from a 'cube farm' sort of corporate as I wouldn't want to work there anyway.
You have several semesters of school to go before you have to worry about whether to work on your startup idea full time or take a position working for someone else. So first of all, don't worry about this until it actually becomes an issue.
Second of all, the fact that you're starting a business while you're in school speaks volumes to me about how motivated and ambitious you are, and will be a big plus on your application when many of your competitors (other students) have nothing to show but schoolwork.
So start your business, run it until you graduate, and then worry about whether you can work full time and run your business. I personally would recommend doing both as long as it doesn't present a conflict with your employer. You'll make more money (hopefully!) and have a more interesting resume in 5 years than someone who just took a full time job.
One of the great reasons to start a company while you are in school is to have a place to prototype and try out ideas without harming an existing company. When and if you choose the "cube farm" company interviews, be clear that your primary expectation was not to cash in or take the easy road, but rather to learn from your own mistakes. You might consider the idea of being able to "land running" (or at least jogging) in your first formal post-school career.
One of the things I would look for when I was interviewing such young in-school entrepreneurs was what did you take away from the experience? Are you a software developer but wrote your first PM spec or your first UI? What "stretch goals" did you try? I love people who say, "I had never done _ before, and I just wanted to try it." Make sure you capture the artifacts of having tried a new project or company. I also love it when candidates say, "I did a lot of the work so I could write about it and learn from the experience." Extra points if you publish those blog posts and share your experience with others.
Lastly, if starting a company while in school did not make you somewhat humble - you probably did it wrong. As a hiring manager I want to see that bit of humble that comes after the bruises heal, PLUS the willingness to go and learn from more mistakes.
Go for it, be proud of it, and most of all document your process of learning something.
I think Ryan hits some good points there.
I would just add to it that the experience you gain from any startup that you work on will give you exponentially more knowledge than a standard straight out of college job. Most employees right out of college are not making the important do or die type of decisions that you will have to be doing throughout your process. As noted, your knowledge won't be as focused as someone who's straight out of college, but that's only important if your goal is to land a level 2 corporate job. Even if you do end up having to fall back to a corporate job at some point, having your own business on your resume definitely helps (I know it's helped me land
Doing your own thing (whether it works or not) will teach you the skills that you need to either make your first idea succeed through hard times or start a second idea after the first one fails. In addition, you won't be addicted to that bi-weekly paycheck you need to pay all your bills which will only make your life easier with any future endeavors you decide to take on.
Take it from a guy who took the easy/safe route and is now trying to break away and do his own thing...breaking that fortnight paycheck addition is difficult!