Hello!
I want to split a mathematical expression 3 + 4 ( 5 * 8 )
into tokens by using space as a splitting mode. e.g
3
+
4
(
5
and so on.
But when I write
string exp;
char space[]=" ";
result=strtok(exp,space);
the compiler gives the error at the 3rd line that:
'strtok' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'char *'
Is there any problem with the data types of exp and space?
Please help me!