별의 공부 블로그 🧑🏻‍💻
728x90
728x170

*[header][C library] cstdarg (stdarg.h)


<cstdarg> (stdarg.h)

Variable arguments handling
This header defines macros to access the individual arguments of a list of unnamed arguments whose number and types are not known to the called function.

A function may accept a varying number of additional arguments without corresponding parameter declarations by including a comma and three dots (,...) after its regular named parameters:

return_type function_name ( parameter_declarations , ... ); 
To access these additional arguments the macros va_startva_arg and va_end, declared in this header, can be used:
  • First, va_start initializes the list of variable arguments as a va_list.
  • Subsequent executions of va_arg yield the values of the additional arguments in the same order as passed to the function.
  • Finally, va_end shall be executed before the function returns.


Types


Macro functions



내용 출처 : http://www.cplusplus.com/reference/cstdarg/

728x90
그리드형(광고전용)
⚠️AdBlock이 감지되었습니다. 원할한 페이지 표시를 위해 AdBlock을 꺼주세요.⚠️
starrykss
starrykss
별의 공부 블로그 🧑🏻‍💻


📖 Contents 📖