CString find the last entry

后端 未结 5 1802
无人共我
无人共我 2021-01-23 08:18

I have two CString s1 and CString s2. I need find the last entry s2 in s1. I can find any metod in CString like in C# LastIndexOf. I am nooby in c++.

5条回答
  •  孤独总比滥情好
    2021-01-23 08:45

    CString is I think part of the "Microsoft Foundation Class Library" and is not Standard C++. There is a reference including methods here:

    http://msdn.microsoft.com/en-us/library/aa315043%28v=vs.60%29.aspx

    I don't see anything to turn that directly into a std::string (which has a lot more methods), but it probably is not so hard, either (search for "CString to std::string" and you'll find some stuff).

    Although they are presumably related, don't confuse this with a c-string, which is an array of chars from Standard C included in Standard C++.

提交回复
热议问题