Firstly, I recommend that you do something different than your approach print_info(), since it is not very flexible - that if you want to actually use the version, and not just print it in STDOUT, or that if you want to tell the versions in a message error message for STDERR? The method staticreturning the string const char will be more universal.
, SVN, . ( ),
char[] versionString = "commit revision $Rev$";
svn propset svn:keywords "Rev" file.cpp, SVN- -
char[] versionString = "commit revision $Rev: 12 $";
, , ,
char[] versionString = "commit revision $Rev: 13 $";
SVN, , ( $URL$) . $Revision$ , . , , (, ..). , $Revision$ , . , , - , SVN.