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

* vs & in C++

Name: Anonymous 2006-10-22 23:00

With a function

void foo(Doodie& poop)
{
  poop.set("diarrhea");
}

is there any difference at all in how it compiles vs

void foo(Doodie* poop)
{
  poop.set("diarrhea");
}

?

It's also strange that you use . instead of -> when you pass-by-reference via * even though pointer members are typically accessed with -> and not .

Name: Anonymous 2006-10-26 5:37

>>6
Who cares what Stroustrup thinks, the guy's a moron. I mean come on, he came up with C++.

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