CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Location
    Islamabad
    Posts
    99

    How to use Tokenize() wid CStrings in VC6

    Hi,
    I am not able to use Tokenize() method wid CString objects in my VC6 application while same code was compiled successfully in VC.Net.

    int curPos = 0;
    CString resToken = strDecimalWords.Tokenize(" ",curPos);

    while strDecimalWords which is CString object,contains "1 hundred 23".

    but VC compiler is showing this compile time error.
    f:\advivr\ivractionmanager.cpp(495) : error C2039: 'Tokenize' : is not a member of 'CString'

    Can anyone suggest wat to do.

    Regards

  2. #2
    Join Date
    Apr 1999
    Posts
    50

    Re: How to use Tokenize() wid CStrings in VC6

    There is a library routine strtok() that may be suitable for your needs. Read the documentation carefully as there are various caveats to its use.

    Nope that helps.

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: How to use Tokenize() wid CStrings in VC6

    Tokenize is not available in the CString implementation of VC6. You can use strtok like Andrew Hain said.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured