473,382 Members | 1,086 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

try and catch block not executing in c++ program

Sir, I want to execute C++ code for exception handling concept which include try and catch block. But when i am trying to execute that code in turbo c++ then it gives errors like 'undefined symbol try, Undefined symbol throw and catch'.
So how to execute program? Is there any other compile required?
Attached Files
File Type: txt TRY.txt (384 Bytes, 245 views)
Feb 17 '16 #1
1 1364
weaknessforcats
9,208 Expert Mod 8TB
This code works fine using Visual Studio 2013 BUT I have to enable C++ exceptions in my project properties. Check your compiler to see if there is a similar setting.
Feb 17 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Travis | last post by:
I am trying to prevent an exception from bubbling up from one nested Try/Catch Block to its "Parent" Try/Catch Block. Here is some example code: try{ try{ //Non-application killing code that...
18
by: Simon | last post by:
I was of the impression that code placed after a Try...Catch block was only executed if there was no exception thrown. I've got some VB.net code as part of a Windows form that executes even...
1
by: Solution Seeker | last post by:
Hi, I have a Problem when i try to put a Try Catch Block Outside all the Functions in a Class. But in .Net, it throws an error. I like to catch all the Unhandled Exception that occured inside...
2
by: CodeSlayer | last post by:
Hi all, This one really has me and the other .Net developers at my work stumped. I have an application that is doing the following: 1 - attempt to validate that user can create a windows task...
2
by: davidz | last post by:
When a catchable error occurs in a try block, control is passed to the associated catch block. While I am then able to examine properties of the error using such functions as ERROR_NUMBER() in the...
9
by: Mr Flibble | last post by:
Hi all, happy Friday! (certainly Friday is a day worth celebrating). I have a question on try/catch design (an exciting Friday topic for sure): I can either put a try/catch block in every...
6
by: foolmelon | last post by:
If a childThread is in the middle of a catch block and handling an exception caught, the main thread calls childThread.Abort(). At that time a ThreadAbortException is thrown in the childThread. ...
10
by: Curious | last post by:
Hi, I've found that if I wrap my code with a try-catch block in the fashion illustrated below, it'll do what is specified in the catch section instead of crashing. Could anyone confirm that this...
8
by: =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?= | last post by:
Is it right when placing the RETURN statement inside the TRY or inside the CATCH statement, when there is a FINALLY clause? Especially when there is a transaction going on, in the try/catch block?...
16
by: HillBilly | last post by:
This is freaking me out. I'm using Membership and trying to determine if the database is online. The GetConnectionString( ) method returns a connection string as expected but not when used in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.