Update main.cpp

I think that this way is a little bit easier! What do you think? Best regards