Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ pointer vs. non-pointer

Name: Anonymous 2010-05-22 19:54

Sup /prog/

C++, if I make my own class, lets just say class cShitHead

cShitHead dave * new cShitHead( "dave" );
dave->PrintName();

or

cShitHead dave( "dave" );
dave.PrintName();

I myself like the pointer notation better. However, which one is more efficient and better on memory? and why?

Name: Anonymous 2010-05-22 21:41

>>15
it's 2010, most people are still stuck with a 4GB RAM limit. until machines with 6GB of RAM cost less than $50, every last bit will still be precious.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List