Message from C, C++ talks

June 2019

— I think that one involves file pointers...

— Literally just give it stdout

— I wanted a code that simply does

gets(str);
puts(str);

— Or simply put, rtfm

— 

Why are you afraid using fgets? Just give that function stdin. It also has type (FILE *) but it handles your standard input stream.

— That doesn't mean you have to using files, it will handle your input from "terminal" / "command prompt".

Message permanent page

— Http://www.cplusplus.com/reference/cstdio/stdin/

— What are the ways to optimize run time?

— What do you want to optimise?

— You mean code?

— Compile with optimization flags enabled, put unchanging values into const and constexpr

— Optimization flags mean?

— Settings for your compiler

— Like?

— Depends on your compiler