Linux Programming

g++ error: conversion from XTestObjectA to non-scalar type XTestObjectBase requested

cite from: The problem is that the number of user-defined conversions that are invoked implicitly is limited (to 1) by the Standard. B ob = a; implies two user conversions: on a: Wrap::operator A*() should be called on the result: B::B(A*) should be called The solution is to use explicit conversion

Continue Reading