Re: Newbie Question- strtok type mismatch

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 29 Apr 2011 10:25:09 -0500


Hi Hermann,

I can not reproduce the problem with the trunk. Which version of ROOT are you using?

Cheers,
Philippe.

On 4/29/11 9:05 AM, Hermann Fuchs wrote:
> Hello
>
> I apologize if this is a stupid question, as I am pretty new to Root
> development.
>
> I am trying to split a string using strtok. The same code fragment works
> outside of root, so i am unsure why this would cause an error.
>
> The troubling lines are:
>
> Char_t line[nBytes];
> Char_t* splitedString;
> ...
> fgets(line,(nBytes+1),fp)
> ...
>
> splitedString = strtok(line," ");
>
> The following error occurs:
>
> Error: strtok param[0] type mismatch readFilesv1.cxx:57:
> *** Interpreter error recovered ***
>
>
> Does anybody have an idea how to solve that problem?
> Any idea would help.
> Background info: I am trying to read an Asci file delimited by spaces.
>
>
> Cheers,
> Hermann
>
Received on Fri Apr 29 2011 - 17:25:19 CEST

This archive was generated by hypermail 2.2.0 : Mon May 02 2011 - 11:50:01 CEST