int main()
{
int *mem_handle = newint;
// if(mem_handle = NULL ) // no need for any of this, new will throw
// { an exception if it fails, so you don't have to
// return 1; check for error return
// }
*mem_handle = 7;
delete mem_handle;
mem_handle = NULL;
return 1;
}
Well, the philosophies for the two languages are quite different and some C features have been deprecated in favor of some C++ features, meaning they don't get much book-space. :/
Not really. The C like approach is very different from a clean C++ approach. Though it's probably easier to get started with C++ and move on to C than the other way round, especially if you are a newbie programmer.