0

Hi there!)
Guys please tell me - where can I see the realization (or custom realization) of fprintf in C++ ?
I'm especially interesed in working with no fixed number of passed parameters.
I need to made somethings like fpintf() by myself but i don't know how....

big thanks in advance)

4
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by vedro-compota
0

guys tell me - how does fprintf() get know - when the list of parameters is ended ?
we not pass Null or 0 parameter as last one. - but everything works.

1

how does fprintf() get know - when the list of parameters is ended ?

It relies on the format string for this information. That's why nothing bad happens if you provide more arguments than the format string uses, but it's undefined behavior if you provide fewer.

0

It relies on the format string for this information. That's why nothing bad happens if you provide more arguments than the format string uses, but it's undefined behavior if you provide fewer

thanks deceptikon ! i've understood you))

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.