Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Stripping from a text file

Stripping from a text file

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    awah
    wrote on last edited by
    #1

    Stripping from a text file what i wan to do is get rid of items in for example, for the string "dsafgsgwrghgrsgwrhhwrfsdf" i want to get rid of "itema" and "itemb" here is my code - open file - copy file to a CString - look for < - look for > CString file_string; CString file_string_temp; int start_index; int end_index; f.Read(file_string.GetBuffer(f.GetLength()),f.GetLength()); start_index = file_string.Find("<"); end_index = file_string.Find(">"); file_string_temp = file_string.Left(start_index); int aaa = file_string.GetLength(); int b=5; but unfortunately it doesnt work is the file too big? the file is about 2,000,000,000 in f.GetLength [B]file_string.Left(start_index);[/B] copies the entire file_string instead of only copying left strings can somebody tell me what's wrong?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups