Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:17:47+00:00 2026-05-27T18:17:47+00:00

I have declared Wstring as follows wstring strID When I try to find the

  • 0

I have declared Wstring as follows

wstring strID

When I try to find the occurrences sub-string as follows

int index =   strID.find("LABS");

I am getting error like the following

error C2664: 'unsigned int std::basic_string<_Elem,_Traits,_Ax>::find(const std::basic_string<_Elem,_Traits,_Ax> &,unsigned int) const' : cannot convert parameter 1 from 'const char [13]' to 'const std::basic_string<_Elem,_Traits,_Ax> &'

Can you please help me to find the occurrences of sub-string?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:17:48+00:00Added an answer on May 27, 2026 at 6:17 pm

    When searching a wstring, you need to have the parameter as a wide string as well

    int index =   strID.find(L"LABS"); 
                             ^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have declared my two dimensional array like this. But getting an error due
Suppose i have declared subscript operators in a class char& operator[] (int index); const
I have a std::map called 'prompts' which is declared like this: std::map<const int, wstring,
I have declared: queue<int, list<int> > Q After a series of calls: Q.push(37); Q.pop();
In my C# source code I may have declared integers as: int i =
I have declared an object in my global.asax file as follows. <object Id=WFRuntime RunAt=Server
I have declared two service contracts as follows: [ServiceContract] public interface IContract1 { [OperationContract]
I have declared my own type: data Book = Bookinfo { bookId :: Int,
I have declared a header file which is giving Syntax error before '{' token.
I have declared a date picker instance as follows: $(#datePickerId).datepicker( { dateFormat: 'DD, d

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.