Di dieu aya program C ++ anu ngitung faktor di waktos kompilasi, anu saluyu sareng standar C ++ 03. ```cpp template<unsigned int N> unsigned int fac() { return fac<N-1>() * N; }; template<> unsigned int fac<0>() { return 1; } ``` } Ngagunakeun témplat sareng spesialisasi template urang nangtukeun fungsi fac<N>() anu balik fac<N-1>)(*N, khususna kasus dimana N = 0 pikeun balik 1.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence