GetLength()

This is a discussion on GetLength() within the C++ Programming forums, part of the General Programming Boards category; I need to know how to use the GetLength function so that I can find the length of a string. ...

  1. #1
    Unregistered
    Guest

    Question GetLength()

    I need to know how to use the GetLength function so that I can find the length of a string. Can anyone help me out, if this is even possible?

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    To find the length of a string, use strlen.

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Or the .size() member function if you are using the string class.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    7
    if you code in VC++, use the _tcslen(), _tcs is basically a substitute, when compiled in ANSI, it gets translated to strlen(), if compiled in unicode, it gets translated to wstrlen()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  2. OpenGL lighting problems
    By sirSolarius in forum Game Programming
    Replies: 0
    Last Post: 12-01-2003, 08:11 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21