finding out a string from a text file

This is a discussion on finding out a string from a text file within the C++ Programming forums, part of the General Programming Boards category; Hi Problem :- finding out a string from a text file ( only in c/c++) my code is taking timecomplexity ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,437
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21