when i use random my settextstyle starts malfunctioning eg if i choose Gothic style i gives plain text if i make randomize a comment it works without bugs can anyone help me and also i heard void main is wrong and int main is correct why??

The description of your problem is at best vague and at worst confusing...Being able to see the code that's actually causing you the problem would help!
So if you could post some code it would help us to help you! (Just don't forget the code tags!)

Also, regarding your question about void main vs int main....Well that particular issue has been discussed numerous times here on Daniweb.
Take a look at:

Cheers for now,

i solved it by using a substitute function rand();