All pastes #98804 Raw Edit

Miscellany

public cpp v1 · immutable
#98804 ·published 2006-07-24 20:36 UTC
rendered paste body
class B {	public:		B() {	}};class A {	public:			A() {	}		void setB(B bb) {		b = bb;	}		B getB() {		return b;	}		private:	B b;};int main(int argc, char *argv[]){		A *tt= new A();		B s();	tt->setB(s);	return 0;}tzu.cpp: In member function `B A::getB()':tzu.cpp:281: error: conversion from `B*' to non-scalar type `B' requestedtzu.cpp: In function `int main(int, char**)':tzu.cpp:295: error: no matching function for call to `A::setB(B (*)())'tzu.cpp:276: note: candidates are: void A::setB(B*)