Identifier not found on function call.

JPERKS1985
JPERKS1985 used Ask the Experts™
on
I'm just beginning C++. I'm trying to call a function and I'm getting "Identifier not found". I'm sure it's something simple. Any ideas?


//The call,

tokenize(HTML, "action: ");


//The function,

void tokenize(char strData[], char seps[])
{

char *token;

	vector<string> vec_String_Lines;
   token = strtok( strData, seps );

 
   while( token != NULL )
   {
      vec_String_Lines.push_back(token);
      token = strtok( NULL, seps );
   }
 

 
    for ( int i = 0; i < vec_String_Lines.size(); ++i)
    DbgOutInt1(vec_String_Lines[i],0);

	

}

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012
Commented:
Do you have a prototype for that function ahead of your call (at the top of the file or in a header)?

I.e.

void tokenize(char strData[], char seps[]); // prototype or declaration

// more stuff

// the call:

tokenize(HTML, "action: ");

// other stuff

// Implementation:

void tokenize(char strData[], char seps[])
{

char *token;

	vector<string> vec_String_Lines;
   token = strtok( strData, seps );

 
   while( token != NULL )
   {
      vec_String_Lines.push_back(token);
      token = strtok( NULL, seps );
   }
 

 
    for ( int i = 0; i < vec_String_Lines.size(); ++i)
    DbgOutInt1(vec_String_Lines[i],0);

	

}
                                  

Open in new window

Author

Commented:
thank you, that did the trick, I have a lot to learn.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial