foo.cpp:31:12: warning: multi-character character constant [-Wmultichar]
printf('%d',ans);
^
foo.cpp: In function 'int main()':
foo.cpp:31:20: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
printf('%d',ans);
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cstdio:42:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from foo.cpp:1:
c:\mingw\include\stdio.h:293:37: error: initializing argument 1 of 'int printf(const char*, ...)' [-fpermissive]
_CRTIMP int __cdecl __MINGW_NOTHROW printf (const char*, ...);
^