We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
and it has to be that way. The easiest way to convert that to C++ is to remove the
new.
For interest I used the Compiler Explorer to compare the output of a simplified version of this problem with the object style and a function style, and they are identical. The important bits are at line 11-18 in the assembly.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 17: More Exceptions
You are viewing a single comment's thread. Return to all comments →
In the Java version of this problem it's
and it has to be that way. The easiest way to convert that to C++ is to remove the
new
.For interest I used the Compiler Explorer to compare the output of a simplified version of this problem with the object style and a function style, and they are identical. The important bits are at line 11-18 in the assembly.