i need to extract numbers from user input. i think it's best to extract them into array of pointers because in that case i can refer to the numbers with their index.
i can't assign an int (which i extracted from a char array) to char* a[];
how should i do that?
the code i've written so far, this is just a piece of the actual code:
Code:
#include <stdio.h>
#define SIZE 100
int getCurrentNumber(int i) {
. . .
return res;
}
int main() {
std::cout << "Enter expression: ";
fgets(expr, SIZE, stdin);
char* simplified[SIZE];
int i=0;
int j = 0;
simplified[j++] = getCurrentNumber(i);
return 0;
}