---
title: "Discussion on \"Getting Type Names in C++\" | Hashnode"
description: "Discussion on \"Getting Type Names in C++\". For logging and debugging it can be extremely useful to get a string for the name of a type in C++. However, the standard library doesn't supply a great way of doing that. We don't want to use the standard typeid operator, std::type_info, or std::typ..."
url: "https://hashnode.com/posts/getting-type-names-in-c/64403a66b68d6ae0a0c6adb4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Getting Type Names in C++](https://radiantsoftware.hashnode.dev/getting-type-names-in-c?utm_source=hashnode&utm_medium=feed)

For logging and debugging it can be extremely useful to get a string for the name of a type in C++. However, the standard library doesn't supply a great way of doing that. We don't want to use the standard typeid operator, std::type\_info, or std::typ...

Apr 19, 2023 · 6 min read · radiantsoftware.hashnode.dev  
Updated Jul 1, 2024  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#types](https://hashnode.com/tag/types)
-   [#game-development](https://hashnode.com/tag/game-development)
-   [#any](https://hashnode.com/tag/any)
-   [#type-erasure](https://hashnode.com/tag/type-erasure)

## Written by

[Paul Mattione](https://hashnode.com/@radiantsoftware)

@radiantsoftware · Bethesda, MD

  
[View profile](https://hashnode.com/@radiantsoftware)

Principal Engine Programmer @ Volition Games

I'm a Principal Programmer working on the Engine Team at Volition Games! The content of this blog is my own, personal work and views, and is not endorsed by any other party.

## Responses 1

Markdown supported · ⌘↵ to post

[Steve](https://hashnode.com/@Oldc0der)

[Apr 12, 2024](https://hashnode.com/posts/getting-type-names-in-c/64403a66b68d6ae0a0c6adb4/comment/66194dcbf3dc647cf2effdc5)

Thanks for the article. However your code samples are incomplete. Get\_TypeName() is not defined and neither is nIsCharacter

[Paul Mattione](https://hashnode.com/@radiantsoftware)

[Jul 1, 2024](https://hashnode.com/posts/getting-type-names-in-c/64403a66b68d6ae0a0c6adb4/comment/66194dcbf3dc647cf2effdc5#reply-6682204c3ff8d1e0905ad680)

Oops I should have mentioned what nIsCharacter was. It's just a boring custom type trait like std::is\_integral\_v. Get\_TypeName() though is defined, are you referring to the class member function?
