+ 1
[Solved ] question re strategy for some Code Coach challenges involving delimited strings
I've finished all but a few of the "medium" level code coaches in Community. The remaining ones mostly involve comma delimited strings ex. Safety Deposit Box, Super sale. Newbie here, just starting to get familiar with string functions like substrings, find, tokens etc. so still unsure of when they're the best options for a given task and how to effectively use them in comparisons. What approaches should I consider for the above mentioned challenges? Any advice/ suggestions appreciated. Not looking for solved code either, just ideas, want to figure these out for myself. Are substrings the best way to resolve the task?
2 Antworten
+ 1
You can review this article to see a couple of ways to deal with this (strtok, getline, substr)
https://www.javatpoint.com/how-to-split-strings-in-cpp
+ 1
Tibor Santa
Awesome, thanks Tibor, worked perfectly!