
Originally Posted by
matsp
And what's the problem with reading all the string at once? Yes, you can do it one char at a time too - do you prefer to do that? If so use getchar() or fgetc().
--
Mats
Mats this is where I've gotten to. What step should I take next?
Code:
#include<stdio.h>
#include<stdlib.h>
#define MAXCOLS 80
int main()
{
int i;
char string[MAXCOLS];
char expr[];
double array[2][3]={{4.5,13,12},{32,12.6,2.5}};
printf("Enter an expression:\n");
while ((expr[i++]=getchar()) != '\n');
expr[--i] ='\0';
/* this will come in later
printf("Expression\n");
printf("%s", string);*/
getchar();
return 0;
}