Problem description:
I want to have this effect. I am using C++ to read an input file. I want to design my input file in this way:
....blahblah.....
Define Length 20
Node ($Length 0.1 0.1)
....blahblah.....
So that $Length
will be automatically replaced as 20.
I am thinking for a more general situation: such as given an arbitrary string
Node ($strLengthUnknown 0.1 0.1)
I would first split the total string into words and then find if some words start with $ sign and then do the replacement.
My question:
I am wondering is there any smarter way? And I don't want to reinvent the wheel. So if you know there is a better way/library that already can do it, would you please let me know. Thanks