+ 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?

29th Nov 2022, 1:58 AM
Scott D
Scott D - avatar
2 Answers
+ 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
29th Nov 2022, 5:50 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Tibor Santa Awesome, thanks Tibor, worked perfectly!
29th Nov 2022, 9:55 PM
Scott D
Scott D - avatar