+ 2
How to create print function like python in c ++?
I create a simple print function of common types just for testing but I'm still not sure how the program works, but I want to create a print function to make my life easier. But I know at most I can create one that only displays strings or integer values, characters, etc. but how to create a print function that shows all types of variables, and also strings? I have to create a lib? Please explain to me.
3 Answers
+ 10
Is this what you mean?
https://code.sololearn.com/ckBxSksYY7HB/?ref=app
+ 5
Here's a discussion and external lib, just for reading about an expansion on printf() and some challenges:
https://blog.galowicz.de/2016/11/05/python_style_printf_for_cpp/
+ 4
You may even try this :
https://code.sololearn.com/cI3toJxFWKYl/?ref=app