cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
input idea
input idea
Dec 5, 2018 at 8:24am UTC
Echelon22
(16)
if one has an input of this shape string s = { { } { { } } { { } { { } } } }
how do you input it such that {} get stored in vector as one element, the following element is {{}}, third is {{}{{}}}
Dec 5, 2018 at 10:45am UTC
salem c
(3685)
Well after the initial {
For each {, increment a counter.
For each }, decrement the counter.
When the counter is 0, you've found a sub-string.
Topic archived. No new replies allowed.