Hi, im trying to create a function that gets two strings , the first string its the source , and the seconed is an understring .
the function should return an int with the value of the position that the understring starts in the source string . so that if ill have thie string as source : "abcdefg" and understring :"efg", than the function should return 5 because "efg" starts at the fifth character of the source string.
i need to do this with array pointers , so any1 has any idea ?
RisTar 0 Junior Poster in Training
Recommended Answers
Jump to Post— Lazaro Claiborn 1Hi, im trying to create a function that gets two strings , the first string its the source , and the seconed is an understring .
the function should return an int with the value of the position that the understring starts in the source string . so that if …
Jump to Post— ~s.o.s~ 2,560So atleast try out something you have in your mind and post it here. Help will automatically ensue..
Jump to Post— WaltP 2,905Im trying to write my own function that does this with array pointers so there is no point to use an existing function .
So? Looking at and understanding an existing function is the way to learn how it's done. Then you can write your own using a similar (not …
All 9 Replies
Lazaro Claiborn 1 Junior Poster
RisTar 0 Junior Poster in Training
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Member #46692
RisTar 0 Junior Poster in Training
RisTar 0 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
RisTar 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.