Search:

Type: Posts; User: firehydrant

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,809

    Thanks.

    Thanks.
  2. Replies
    4
    Views
    1,809

    The error is on the exp[j]... line. I don't think...

    The error is on the exp[j]... line. I don't think I need an & there.
  3. Replies
    4
    Views
    1,809

    atoi & atof functions

    There seems to be an error when I try to compile this code. This is a sample code from my homework (parsing a polynomial).


    main()
    {
    char string[max];
    int exp[max];
    int i = 0,...
  4. Replies
    5
    Views
    6,864

    I got it already. Thanks! I didn't change the...

    I got it already. Thanks! I didn't change the array argument in the strcpy function. Why did it work? Doesn't the initialization --tokens[STRINGS][MAXLENGTH]-- mean that it's a 2D array?
  5. Replies
    5
    Views
    6,864

    in the strcpy function, how would the array...

    in the strcpy function, how would the array argument look like?
    Will I change it to something like this? since it's already a 2D array

    strcpy(tokens[i++][k++], token)
  6. Replies
    5
    Views
    6,864

    strtok & strcpy

    I'm using the strtok & strcpy for the program I'm doing. It's sort of a parser of polynomial equations. The strtok function works fine. However, when I try to add the strcpy function to save the...
  7. Replies
    12
    Views
    1,737

    Thanks! I'll try the isupper and islower later.

    Thanks! I'll try the isupper and islower later.
  8. Replies
    12
    Views
    1,737

    this is already a bit off topic, but it's still...

    this is already a bit off topic, but it's still part of the program i'm working on. I saw this sample code about parsing.


    /* strtok example */
    #include <stdio.h>
    #include <string.h>

    int...
  9. Replies
    12
    Views
    1,737

    @quzah isNum and isAlpha are functions I wrote...

    @quzah

    isNum and isAlpha are functions I wrote in the program.
    I'm new in this forum so sorry for that.
  10. Replies
    12
    Views
    1,737

    I tried the isdigit and isalpha with the stdlib...

    I tried the isdigit and isalpha with the stdlib header file but the compiler says it's undeclared.
  11. Replies
    12
    Views
    1,737

    oh thanks! I tried it and it worked. A little...

    oh thanks! I tried it and it worked. A little problem with the condition for numbers though.
    When using this sample code, the numbers in the string passes the 2nd if, and also the else.
    ...
  12. Replies
    12
    Views
    1,737

    if and while conditions

    I'm trying to parse a string (polynomial function) for my program. Are these conditions allowed for if and while?

    if (a >= '0' && a <= '9') ---> checks if char is a number
    if ( a>= 'A' && a...
  13. Replies
    16
    Views
    5,545

    I already did a version just like what you said...

    I already did a version just like what you said for my program, as a last resort. But it's required that the user will input the whole polynomial. Right now, I'm trying to do a polynomial parser, and...
  14. Replies
    16
    Views
    5,545

    how do you that math expression parsing?

    how do you that math expression parsing?
  15. Replies
    16
    Views
    5,545

    ok Thanks!

    ok
    Thanks!
  16. Replies
    16
    Views
    5,545

    how do i do it exactly?

    how do i do it exactly?
  17. Replies
    16
    Views
    5,545

    we haven't tackled structs yet in class, so as of...

    we haven't tackled structs yet in class, so as of the moment, i can't use those.

    if i use strings to store the polynomial, is there a way to pick out the numeric parts of it? that way, i can...
  18. Replies
    16
    Views
    5,545

    how?

    how?
  19. Replies
    16
    Views
    5,545

    say i use strings to store the polynomial, how...

    say i use strings to store the polynomial, how can i save it as a function?
  20. Replies
    16
    Views
    5,545

    question about programming polynomials

    our homework is actually a long one, about numerical analysis, roots of poylnomials, etc. the problem is i don't know how to do the first step, which is storing/saving a user-input polynomial(eg this...
Results 1 to 20 of 20