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 6987549
In Process

The Archive Base Latest Questions

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

I apologize if this has been asked before but I am trying to parse

  • 0

I apologize if this has been asked before but I am trying to parse an array of characters in away I can obtain filenames.

Here is an example of the character array I end up copying in.

picture1.bmp   file2.txt   random.wtf   dance.png

Notice that there are 3 spaces between each filename.

I want to do something along the sorts of:

  1. Assuming we start at the first character, advance until we reach a space.
  2. Copy everything up to that space into an array at index 0.
  3. Skip 2 spaces (to traverse the 3 space gap).
  4. Go until we hit a space and then copy that into array index 1.

I could do a hack job of this, just curious as to how some of the more advanced programmers would do this as I am here to learn.

  • 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:57:07+00:00Added an answer on May 27, 2026 at 6:57 pm
    std::istringstream iss(the_array);
    std::string f1, f2, f3, f4;
    iss >> f1 >> f2 >> f3 >> f4;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologise if this has been asked before but I can't find the info
I apologize if this has been asked before, but I haven't quite found the
If this has been asked before, I apologize but this is kinda of a
I apologize if this has been asked before. I searched but did not find
I apologize if this has been asked but I can't seem to find it
I apologize if this has been asked before, but I believe that for me,
If this has been asked before I apologize but I wasn't able to get
(Apologies if this has been asked before - I can't believe it hasn't, but
Apologies if this has been asked before (I couldn't find the answer anywhere), but
First, I apologize if this has been asked before - indeed I'm sure it

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.