TimePlot not taking string variables
Posted: Fri Jul 19, 2019 1:42 am
Hi
I am trying to use the TimePlot constructor to create different variable streams without putting the string directly in the Timeplot argument, sort of like so:
String tmp="blah";
TimePlot TempPlot1(tmp);
As opposed to just saying Timeplot TempPlot1("blah");
But I get a compile error. (Sorry can't easily copy the error right now). But is there anything obviously wrong with doing this? I don't see it. Do I need to do some kind of clever TempPlot1((char *) tmp) type cast to turn the string into a pointer? Because I tried that and it doesn't work.
Thanks
I am trying to use the TimePlot constructor to create different variable streams without putting the string directly in the Timeplot argument, sort of like so:
String tmp="blah";
TimePlot TempPlot1(tmp);
As opposed to just saying Timeplot TempPlot1("blah");
But I get a compile error. (Sorry can't easily copy the error right now). But is there anything obviously wrong with doing this? I don't see it. Do I need to do some kind of clever TempPlot1((char *) tmp) type cast to turn the string into a pointer? Because I tried that and it doesn't work.
Thanks