I have no idea how to do this with C or C++ in DOS, but if I were you I'd pipe the output of your program through a Perl mailer script. This makes things mucho simple. :-)
Code:
#!/usr/bin/perl -w
use Mail::Mailer;
$self = "sender's address";
$address = "your address";
$send = Mail::Mailer->new();
$send->open({From => $self, To => $address, Subject => 'Facts'}) or die $!, "\n";
while (<>) {
print $send $_;
}
$send->close();
Then you can just collect the answers with strcat and do this
Code:
char mail[10000] = "mail.pl ";
strcat(mail, answers);
system(mail);
*disclaimer: I didn't test any of this, just wrote it off the top of my head. :-)