"2005" <uw*****@yahoo.comwrote:
How do I match the "{" with "}"
This is to math the loop begin and end.
You use strcspn() or strbrk() to find the '{'s and '}'s, and you use a
stack construct (either indirectly, through recursion, or directly,
using, say, a linked list) to determine which '}' belongs to which '{'.
If you want to know how, the simplest way of figuring out an algorithm
is, as so often, to sit down behind a piece of paper, copy down a random
formula with such brackets in it, and observe how you yourself match
them up.
There is a command/short cut (say ALT F5)
ISO C does not guarantee that you even have Alt or F5 keys, let alone
that you can read them.
Richard