parsing user commands into my progam
lets say i have a class that computes the addition. substraction , powers of complex numbers.
currently to use the program i have to do this:
1 2 3 4 5 6 7 8
|
Complex A,B;
cin >> A;
cin >> B;
Complex C;
C = A+B;
cout << C;
|
is there a way in which i can allow the user to write their own commands during runtime i.e.
1 2 3 4
|
a = 1+2i
b = 2+3i
a = b
a = ?
|
does this have anything to do with shell programing?
You can write a simple parser, streams are helpful in this
does this have anything to do with shell programing? |
No
Topic archived. No new replies allowed.