From 0c289329700c6562b00e6be715a92af0717177aa Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 21 Jul 2020 23:43:12 +0300 Subject: [PATCH] llo --- llo/helloworld.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/llo/helloworld.c b/llo/helloworld.c index 020484e..387cb3e 100644 --- a/llo/helloworld.c +++ b/llo/helloworld.c @@ -1,8 +1,18 @@ #include +#include +#include + + +int main (int argc, char *argv[]) + { + + std::string path(argv[1]); + std::fstream file; + file.open(path,std::ios::trunc | std::ios::out); + file<<"hello world\n"; + file.close(); + + printf ("Hello, world!\n"); + return 0; + } -int -main (void) -{ - printf ("Hello, world!\n"); - return 0; -}