For example, I have this string: SMUL 9 A B
? How can I get 9 (int type) A (char) and B (char). Possible string may be SMUL 12 A C
, so it means their positions in the string is not constant.
Further explanation: this is a string inputted by a user for my matrix calculator program. Inputting SMUL "scalar" "matrix-1" "matrix-2" means that the matrix operation is a SCALAR MULTIPLICATION with "scalar" as the number to be multiplied to the matrix, "matrix-1" is the matrix to be multiplied by the scalar, and "matrix-2" is the matrix where the results will be displayed. Hope you could help me. My project is now due 2 days from now.