strstr() overloading?

solved.
Last edited on
1
2
3
const char * strstr ( const char *, const char * );
      char * strstr (       char *, const char * );
      char * strstr (         BOOK, char * ); // your code 

How would you convert a BOOK into a char *?


Note:
1. How does your function know that the array book has exactly 50 elements?
2. What is the purpose of 'rows'?
still don't understand @_@

my BOOK is a structure...
1
2
3
4
5
6
7
8
9
struct BOOK
{
	char ISBN[20];
	char name[60];
	char edition[10];
	char author[60];
	char imprint[100];
	double price;
};


rows is the size of the arrays...
What do you expect to happen, if you do:
1
2
3
const char * foo = "Hello";
BOOK bar;
char * gaz = strstr( bar, foo ); // what should the strstr do here? 
Topic archived. No new replies allowed.