C++ printf: newline (\n) from commandline argument

前端 未结 7 1750
刺人心
刺人心 2020-12-20 02:07

How print format string passed as argument ?

example.cpp:

#include  
int main(int ac, char* av[]) 
{
     printf(av[1],\"anything\");         


        
相关标签:
7条回答
  • 2020-12-20 03:12

    I know the answer but is this thread is active ? btw

    you can try example.exe "print this$(echo -e "\n ")on newline".

    I tried and executed Regards, Shahid nx

    0 讨论(0)
提交回复
热议问题