User-submitted CPP Projects

26
1548 reads

February 7, 2013

Exception handling with Localized try-catch block


This example demonstrates how to handle exceptions locally within the function itself.

28
1257 reads
atirtahir's picture

Submitted by

atirtahir
smanagements
Student management system, this project is based on structure, functions, arrays, loops etc. Its a simple project using basic concepts.
smanagements

Run It Now!
39
1545 reads

February 7, 2013

Exception handling when a function throws an Exception


This example demonstrates how to catch exceptions thrown by a function and the flow after that. The function would throw an exception only in particular cases.

23
1557 reads

February 7, 2013

Simple Exception Handing Example


This example demonstrates the use of try-catch block. The try block explicitly throws an exception which is caught by the catch block.

29
1671 reads

February 7, 2013

Global and Local Variables


Local variables with the same name as a global variable hide the global variable inside that block.

53
2977 reads

February 7, 2013

Static and Dynamic Initialization of Variables


A variable can be initialized either statically or dynamically.

39
263 reads

February 7, 2013

Assigning enum values


This example demonstrates how to assign enum values to a variable.

132
1565 reads

February 7, 2013

typecasting a variable


This example demonstrates how to typecast a float number into an integer.

22
1650 reads

February 7, 2013

Division by 0 - Exception Check


An exception is thrown by using the throw keyword from inside the try block. Exception handlers are declared with the keyword catch, which must be placed immediately after the try block.

38
1674 reads

February 7, 2013

Integer Exception


An exception is thrown by using the throw keyword from inside the try block.
Exception handlers are declared with the keyword catch, which must be placed immediately after the try block: