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

  • SEARCH
  • Home
  • 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 8192795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:15:24+00:00 2026-06-07T04:15:24+00:00

string str; stringstream buffer; buffer << is.rdbuf(); str = buffer.str(); cout << str.length(); size_t

  • 0
string str;
stringstream buffer;

buffer << is.rdbuf();

str = buffer.str();

cout << str.length();
size_t pos = str.find_first_not_of(".123456789");

Can someone please explain to me why this code doesn’t work?

When I run it, it just sits there after I enter “12345”

What on earth is going on?! I’m not too familiar with stringstreams but why wouldn’t this, and other seemingly mundane operations work as expected?

  • 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-06-07T04:15:25+00:00Added an answer on June 7, 2026 at 4:15 am

    Maybe this is what you are looking for:

    string str;
    getline(is,str);
    cout << str.length();
    size_t pos = str.find_first_not_of(".123456789");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question can be boiled down to, where does the string returned from stringstream.str().c_str()
Here is the code: string str; cin>>str; cout<<first input:<<str<<endl; getline(cin, str); cout<<line input:<<str<<endl; The
I'm having some issues with std::cout, std::stringstream, and std::string.c_str(). Mainly, it seems that there's
std::string str; std::stringstream strm(str); I get this error: Error 11 error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' :
I have the following code in C++: string str=a b c; stringstream sstr(str); vector<string>
Every one know stringstream.str() need a string variable type to store the content of
I've got the following code: std::string str = "abc def,ghi"; std::stringstream ss(str); string token;
I am splitting a string into a vector of strings vector<string> tokens; stringstream strstm(str);
String str = abcde123_92qwq_1a_02x_1e; I want to replace the first string part between the
string str = one three; string::iterator it; string add = two ; Lets say

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.