i want some encapsulation problem

int num;

here i have a problem if user enter a string i get encapsulation how can i solve it in easiest way
my friends told me some function of try() ..catch() but I don't understood it

Thanks Sergey

Then have a look at the helpfile, it has a number of examples.

it's hard to understand it,
I don't know what to fill to Catch() parentness
and do i must use throw;

I want just to prevent of entering wrong data from user of my program

I mean :

int num;

this cause encapsulation and I want to prevent it

If somebody can put some code here i will be glad to check it
Thanks Sergey

I guess your last post isnt enough .. you feel you need to ak the same question again?