Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Debugging - value of char* using typedef
Forum Updated to NodeBB v4.3 + New Features

Debugging - value of char* using typedef

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 388 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • seunginS Offline
    seunginS Offline
    seungin
    wrote on last edited by seungin
    #1

    I have a question about qt creator C++ debugging on Ubuntu.

    When I'm debugging with qt creator,
    typedef seems to have a problem - printing char*.

    Test code is below:

    typedef char char_t;
    
    int main () {
      const char* str = "test";
      const char_t* str2 ="test2";
      ...
    }
    
    (In Debugging Window)
    Name    Value   Type
    str     "test"  char*
    str2    116     char_t
    

    116 means character 't' of string "test".

    char_t is equal to char,
    so I think that const char_t* also should print "test2", not 116.

    This is a qt creator bug?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved