Looking for a macro equivalent to strlen()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jorba101
    New Member
    • Jun 2008
    • 86

    Looking for a macro equivalent to strlen()

    Is there any way of getting the length of a const char[] at compile time using macros?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by jorba101
    Is there any way of getting the length of a const char[] at compile time using macros?
    You could have a look at the compile time operator sizeof; it returns the number of bytes taken by a type or an expression.

    kind regards,

    Jos

    Comment

    Working...