Miscellany
public cpp v1 · immutableclass 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*)