This seems to compile fine. Are you entering it as a different language
than C++?

On Fri, Nov 7, 2014 at 5:15 PM, Xiongqi ZHANG <zhangxion...@gmail.com>
wrote:

> Why would you need to capture runtime exception?
>
> 2014-11-07 21:43 GMT+08:00 Hussam Cheema <hussam7...@gmail.com>:
>
>> Guys UVA identify Compile error in this program plss help me out!!
>>
>> #include<iostream>
>> using namespace std;
>>
>>
>> int main(){
>>
>>         int T, num, greater, i, arr[50];
>>         int count=0;
>>         int *p;
>>
>>         p=arr;
>>
>>         cin>>T;
>>         try{
>>         if(T<=50){
>>
>>                 while(T>0){
>>
>>                         cin>>num;
>>                         greater=0;
>>                         count++;
>>
>>                         for(i=0; i<num; i++){
>>
>>                                 cin>>*(p+i);
>>
>>                                 if(greater<*(p+i)) greater = *(p+i);
>>
>>                         }
>>
>>
>>                         cout<<"Case "<<count<<": "<<greater<<endl;
>>
>>                         T--;
>>
>>                 }
>>
>>         }
>>         }catch(runtime_error e){
>>                 throw e;
>>         }
>>
>>         return 0;
>>
>> }
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Code Jam" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-code+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-code@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-code/b4cf295f-d61b-4198-a80e-2cefa9acaaa9%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-code+unsubscr...@googlegroups.com.
> To post to this group, send email to google-code@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/CAGDEU-%2BtBgetLLtwPohphC0x1ptuQBDmgpeneaim-Q%2BTZnZJ_w%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-code/CAGDEU-%2BtBgetLLtwPohphC0x1ptuQBDmgpeneaim-Q%2BTZnZJ_w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAECKw-N5Ltk4Em9PowsS9mjRayOAcNLbp%3DwY0%3DjD5nq8pnkzBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to