Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
Looking for a macro equivalent to strlen()
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
jorba101
New Member
Join Date:
Jun 2008
Posts:
86
#1
Looking for a macro equivalent to strlen()
Jun 11 '09, 08:20 AM
Is there any way of getting the length of a const char[] at compile time using macros?
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#2
Jun 11 '09, 09:18 AM
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
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment