sorry, i couldnt think of a better title. What im trying to do is to make a CAS system, and i need to define certain things, such as a "term". a term consists of a coefficient and symbols, such as xyz. its a bit more complicated but you get the picture. Ive got something working on python, and now im porting it to c, i dont really have much experience with c which is why i need a bit of help.
Firstly, how do you pass strings to structs. For example
outputs a whole bunch of random characters.Code:
typedef struct test
test.str = "test";
also, my struct for a term will look something like this.
The problem is is i don't know how many coefficients, symbols, or brackets each term is going to have. This is a problem because I want to put this onto my calculator, which has about 100kb of free ram if im lucky, so having an array of 26 symbols just to make sure i can fit them all will result in huge wastage. is there a method to get around this. Thanks.Code:
typedef struct Term