From 3183d72e7956c696f430800e0be8c7dd070d8777 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Mon, 2 Dec 2024 11:45:07 +0300 Subject: [PATCH] get type name in c++ --- content/posts/2024/cpp/get-variable-type.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 content/posts/2024/cpp/get-variable-type.md diff --git a/content/posts/2024/cpp/get-variable-type.md b/content/posts/2024/cpp/get-variable-type.md new file mode 100644 index 0000000..8dca557 --- /dev/null +++ b/content/posts/2024/cpp/get-variable-type.md @@ -0,0 +1,14 @@ +--- +title: "πŸ—³οΈ ΠŸΠΎΠ»ΡƒΡ‡Π΅Π½ΠΈΠ΅ Ρ‚ΠΈΠΏΠ° ΠΈΠ· ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎΠΉ Π² C++" +date: 2024-12-02T11:38:24+03:00 +draft: false +tags: [cpp, development, tips] +--- + +ΠŸΡ€ΠΈΠΌΠ΅Ρ€: + +```cpp +#include +... +std::cout << typeid(variable).name() << std::endl; +```