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.
Have no deallocation of memory at the end of program.
In C++ have to use "vector< Person* > per" instead *per[n]. And in C++14 more likely to use "vector< unique_ptr< Person > >" and "per.push_back( move( make_unique< Student > () ) )" instead "per[i] = new Student". Modern C++ doesn't need directly memory allocations.
Have no in basic includes. It's no problem to allocate memory and copy string value, but it's no C++-way.
In C++14 more likely to use "for( auto &p : pre )" instead "for(int i=0;i
Resume: it's very dirty and no helpful example for newbie and teaching them a very ugly style of programming.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Virtual Functions
You are viewing a single comment's thread. Return to all comments →
Very dirty example.
Resume: it's very dirty and no helpful example for newbie and teaching them a very ugly style of programming.