Thread: Question About Strings

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    8

    Question About Strings

    Hello

    What if i have a string ,and want to search for data in it,not from that start,but from a specified location how can i do it?


    i tried to using :

    Code:
    string temp ;
    size_t loc;
    temp.find("x",loc);
    But its not working :\

    thanks alot

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    In your code you haven't initialized temp and loc. Otherwise it should work.

    Post a real example that you tried and didn't work and describe how it didn't work (compiler error, unexpected results etc).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about strings in c
    By gp364481 in forum C Programming
    Replies: 9
    Last Post: 11-13-2008, 06:32 PM
  2. strings question
    By cstudent in forum C Programming
    Replies: 4
    Last Post: 04-18-2008, 07:28 AM
  3. Functions and Strings Question
    By StrikeMech in forum C Programming
    Replies: 4
    Last Post: 07-18-2007, 06:07 AM
  4. Strings question
    By kimimaro in forum C Programming
    Replies: 10
    Last Post: 03-15-2005, 12:14 AM
  5. question about arrays of strings
    By lakai02 in forum C Programming
    Replies: 14
    Last Post: 12-25-2002, 09:11 PM