Source type not polymorphic

This is a discussion on Source type not polymorphic within the C++ Programming forums, part of the General Programming Boards category; I want to be able to add the functionality (somehow) in red. Any ideas?
Code:
#include <iostream>
struct Foo{
public:
...

assuming you haven't dumbed down the types you're using for the purposes of your example, you could use a polymorphic setter method. you can assign int to char just fine, it will just ignore the upper 3 bytes.