I'm trying to convert my C code to C++, but i get this warning for the following expressions:
What is the new-style cast for these lines of code?
What does the warning say?
It says: use of old-style cast
I assume you are using the latest version of Keil MDK, and using Arm Compiler 6. I also assume the output window says something like:/../myfile.cpp(1183): warning: use of old-style cast [-Wold-style-cast]1) since this is only a warning... Under Project -> Options For Target -> C/C++ tab , for Misc controls, you could add -Wno-old-style-cast ...press OK and rebuild the project. 2) You could convert your C-style casts into a C++ style cast (the "new" style casts)https://forum.qt.io/topic/93635/is-there-a-new-style-for-casting
Yes, i'm using the latest version of the Keil software.
And this line in Misc controls erased the warnings. Thanks a lot.
As for option 2, i read it, and i'm new to this type-casting. As i understood type-casting converts one data type into another. But does this only happen inside the scope of one programming language or one language to another (C-style data type to C++-style data type)?