Dude , the reason why your app cannot run on those other free servers is not because of the service , cause as long as the free service supports CGI it should allow your app to execute with no biggie ..since CGI is just std::cin << "blah blah " or std::cout << "blah blah " .. basic I/O would suffice.
So like check the web server architecture and try and compile on such a system .. I am pretty sure you are using an x86_32 arch to compile your app whereas most hosting provides run x86_64 arch without 32 bit compatibility for linux installed.
Use this php script to investigate the arch on your free hosting (since they all allow php the script is in php , but you can use other language to check)
<?php
echo php_uname('s');/* Operating system name */
echo "<br />";
echo php_uname('n');/* Host name */
echo "<br />";
echo php_uname('r');/* Release name */
echo "<br />";
echo php_uname('v');/* Version information */
echo "<br />";
echo php_uname('m');/* Machine type */
echo "<br />";
echo PHP_OS;/* constant will contain the operating system PHP was built on */
?>
Sample output : host is awardspace
Linux
opportunity.awardspace.com
2.6.24.3
#4 SMP Thu Sep 10 13:08:39 UTC 2009
x86_64
Linux
Hope this helps someone .. :) since this thread is 2 years old.