0

printf (および他の多くの関数) がどのように機能するかを確認したいと思います。

私が書いた

#include <Windows.h>
#include <stdio.h>
int main()
{
printf("");
return 0;
}

main.c コードで、右クリック メニューの定義に移動します。

しかし、それは次のようなものを示しています

_Check_return_opt_ _CRTIMP int __cdecl printf(_In_z_ _Printf_format_string_ const char * _Format, ...);
#if __STDC_WANT_SECURE_LIB__
_Check_return_opt_ _CRTIMP int __cdecl printf_s(_In_z_ _Printf_format_string_ const char * _Format, ...);
#endif

printf の仕組みに関するヒントが見つかりません。

標準ライブラリの実装を学ぶ方法を教えてもらえますか?

4

1 に答える 1

2

どうぞ:

http://sourceware.org/git/?p=glibc.git;a=blob;f=stdio-common/vfprintf.c;h=d5690342536bc8cf948c786f663bb63f73f91f3a;hb=HEAD .

これは、GNU C ライブラリの実装 (GLIBC) からのものです。

于 2012-06-09T11:42:15.617 に答える