Better alternative for c++ old feature? -
C ++ has come a long way, there is a lot of convenience in doing it the same way Inspires. What do you think should be avoided which features you should be listed and the better options should be listed for this.
Using SmartPointers in Points Places
Avoid malloc, use new one.
Avoid memcpy, use a copy manufacturer. Avoid
use #defines , const s.
Avoid the macro, use the template.
If you can use increments in advance.
Avoid new types, use collection of price types, make a collection deal with memory management.
Avoid new objects from pointers, use boost:: Scope_ptr or boost :: shared_ptr.
Avoid writing your code to cross collections, & lt; Algorithm & gt; s
Avoid changing the wheel again, see what you need.
To save the strings, avoid "four * names", use std :: string.
"Avoid Static (Internal Linkage) Declarations" Use anonymous name space / P>
Comments
Post a Comment