using string::find with a pointer?
hey,
Is there any way that you can use the string::find command with a pointer?
Here's what i've got sofar
1 2 3 4 5 6 7 8
|
string one[3];
string * point;
int a = 0
while (a <= 2)
{
found = *point[a].find("test");
// The rest of the code is working.
|
Last edited on
1. initialise the pointer
2. tweak the syntax
1 2 3 4 5 6 7 8
|
string one[3];
string * point = one;
int a = 0;
while (a <= 2)
{
found = point[a].find("test");
// The rest of the code is working.
|
Are you looking for a specific value in the array, or a substring? The find or find_if algorithms might be of use.
Topic archived. No new replies allowed.