User Profile
Collapse
-
Do you have any examples you could show me? I'm not exactly sure what you are saying.... -
how do I convert a string to char array to find a substring within a string?
I am trying to find a string within a substring using strstr. This only works with char arrays. I have an array of objects of which I am searching a particular property which is a string.
Code:char *strPtr; int index = 0; bool located = false; do { for(index = 0; index <NUM_BOOKS; index ++) { strPtr = strstr(bookList[index].getTitle(), book);//str1, str2); if(strPtr
Last edited by RedSon; Mar 9 '10, 10:43 PM. Reason: Rule #1 of posting questions, no one is going to read it if you don't make your code look nice. USE [CODE] TAGS!
No activity results to display
Show More
Leave a comment: