The user enters the following :
" x+sin(x)-pow(x,2)+5log(x)"
How can I make parsing for a statement like that .
The user enters the following :
" x+sin(x)-pow(x,2)+5log(x)"
How can I make parsing for a statement like that .
Look at the string character by character.
I did . but I have no Idea .
I have just finished a Course in C and this is the final project .
Can you guide me to some teaching books or helpful websites
Basically this problem is identifying "strings of interest" log / sin / cos / (x)
You use the strtok function to identify the start and end of these kind of strings
Basically this problem is identifying "strings of interest" log / sin / cos / (x)
You use the strtok function to identify the start and end of these kind of strings
strtok
modifies its target string. This is a bad thing if you want to search multiple times over several delimiters.
In almost all cases strtok
is the wrong tool to use when parsing input.
Well I am lost
Describe why. Lot's of answers here, and since you finished the course, you must know how to work with arrays. What's your real problem?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.