Skip to content

Instantly share code, notes, and snippets.

@jvcleave
Created June 24, 2012 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jvcleave/2984198 to your computer and use it in GitHub Desktop.
Save jvcleave/2984198 to your computer and use it in GitHub Desktop.
pointer question
/////SCENARIO 1
//Class 1
Camera camera;
sendCamera(camera);
//Class 2
Camera* camera;
void receiveCamera(Camera &incomingCamera);
{
camera = &incomingCamera;
}
/////SCENARIO 2
//Class 1
Camera camera;
sendCamera(&camera);
//Class 2
Camera* camera;
void receiveCamera(Camera *incomingCamera);
{
camera = incomingCamera;
}
Are these equal?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment