1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

String vs. Stream?

Discussion in 'C' started by RichSelian, Aug 31, 2010.

  1. RichSelian

    RichSelian New Member

    Aug 31, 2010
    Likes Received:
    Trophy Points:
    I've written a function to do some lexical analysis as following:
    struct Token* GetToken(FILE* stream, int* line, int* column);
    Now in another project I want to write an expression calculator. The first step is to cut the expression into tokens. So I want to use my GetToken() method. But the ploblem is, my expression is stored in a string, just as "char expression[512];". How can my function GetToken() work on a string?

Share This Page