A
A
Artem2022-01-07 18:51:14
C++ / C#
Artem, 2022-01-07 18:51:14

How to enable warning about unsafe implicit casting?

I'm used to the fact that in Java, when overflowing (with the exception of an increment), an error occurs, and in C ++ the compiler does not even warn (only if the overflow is a literal). Is it possible to enable the compiler to notify about an unsafe cast?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2022-01-07
@Trame2771

0) Such errors occur at runtime, that is, when the application is running.
1) When the application is running, the compiler is no longer involved.
2) C++ handles all these errors, only it needs to be programmed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question