Thread: finding out a string from a text file

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    19

    finding out a string from a text file

    Hi

    Problem :-

    finding out a string from a text file ( only in c/c++)

    my code is taking timecomplexity as o(mn) in worst case.
    where m is the size of the string and n is the size of the file.

    can anyon suggest better approach ??

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading text file into a string obj
    By thetinman in forum C++ Programming
    Replies: 8
    Last Post: 09-02-2008, 11:42 AM
  2. search for text string in a file
    By basenews in forum C++ Programming
    Replies: 2
    Last Post: 05-03-2007, 05:15 AM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Calculator + LinkedList
    By maro009 in forum C++ Programming
    Replies: 20
    Last Post: 05-17-2005, 12:56 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM