Exception Handling errors in c++ [closed] - c++

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
i am unable to do an Exception Handling program in C++ in my MS DOS & Turbo c Compilers. can i have suggestions or any needful statements for that?
Some fatal error of program
program code

To use exceptions, you need to use a compiler that supports exceptions. Turbo C++ compiler does not support exceptions.
To use Turbo C++, you must not use exceptions.

Related

error: use of deleted function ‘std::unordered_map [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
I've been working on some C++ code that a friend has written and I get the following error that I have never seen before when compiling with gcc11.1:
enter image description here
enter image description here
Generally speaking, what does this error mean? What should I be looking for when this type of error occurs?
I have tried to compile with several versions of gcc, but without much success

Const Auto/Identifier Errors [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I having trouble understanding why it won't identify this.
Any help is greatly appreciated.
Errors
Rest of the Code
This is C++17 syntax. As this standard is not yet the default option for most compilers you have to tell the compiler that you are using it via the -std=c++17 switch.
PS: you didn't say which compiler you are using, so maybe it will not support that switch or not even support C++17 at all.

What can I do if code::blocks shows error when I try to use graphics.h for c/c++? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Today I tried to write a code using graphics.h in code::blocks. But instead of showing appropriate result, it showed "no such file or directory". But, isn't graphics.h is one of the header file of c/c++? So, if there is any solution, tell me what to do so that I can use it in code::blocks. Or, if you have any other better substitutive idea, it is sure to be appreciated.
Graphics.h is not a part of Standard C++. It is the main header for the Borland Graphics Library that originated with Borland C about 30 years ago. It has been obsolete for about 20 years.
C++ doesn't officially recognize the existence of pixels, so you need an external library to do graphics. It's against the rules to for me to do this, so don't tell anyone, but take a look at SDL.

why does scanf_s cause Compiler Error on OnlineJudge? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I use scanf_s to input data.
It causes compiler error on OnlineJudge, while scanf can pass the test.
I've included cstdio.
Is scanf_s included in other STLs?
As Govind Parmar stated in his comment, scanf_s is a Microsoft extension. OnlineJudge uses GNU C++ compilers, and thus, using Microsoft extensions will not work.
Helpful note: if you'd like to test your code on a standard compiler before submitting, there are several available online, such as ideone.

Basic example from chaiscript.com throws an exception at runtime [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I added the include directory of chaiscript to my Projects Additional Dependencies and compiled this example successfully.
If I execute it though, it throws this exception:
Unhandled exception at 0x753D5B68 in CHAISCRIPT_TEST.exe: Microsoft C++ exception: chaiscript::exception::load_module_error at memory location 0x0103F0D8.
After further testing around chaiscript seems to complain about not finding the module chaiscript_stdlib-5.8.0
How do I fix that?
Found the solution. The std_lib module has to be initialized the way the example shows.