Search:

Type: Posts; User: kitsune3233

Search: Search took 0.00 seconds.

  1. Replies
    9
    Views
    1,579

    What you seem to be wanting is if a specific...

    What you seem to be wanting is if a specific character matches, replace that character with the specified symbol. Your last code did that correctly, meaning your if statement was correct. By using...
  2. Replies
    6
    Views
    4,512

    Exactly. And if you don't know your compiler and...

    Exactly. And if you don't know your compiler and system well enough to determine whether you should check it, chances are that you should probably be checking anyway.
  3. Replies
    9
    Views
    1,579

    Well, you're getting closer... :) Farray[i]...

    Well, you're getting closer... :)


    Farray[i] = ("%c", symb);
    Farray[i] = ("%c", string1[i]);
    What do those two lines do? Remember they're pretty much identical, so they behave the same way. ...
  4. Replies
    6
    Views
    4,512

    Actually, there's a very big problem with...

    Actually, there's a very big problem with malloc() that you won't see with calloc(), though the problem isn't really a problem if you're not making your structs unusually large and you're not...
  5. Replies
    9
    Views
    1,579

    symb is a char, just like Farray[i] is a char. 1...

    symb is a char, just like Farray[i] is a char. 1 is an int, just like 2 is an int. In other words, you should just be doing Farray[i] = symb (no functions needed to do that!) :)

    Note that your...
  6. Replies
    9
    Views
    1,579

    There are numerous issues with your code, but...

    There are numerous issues with your code, but your main problem is the fact that you didn't return a value from symbol() like you said you would. Also, you might find that your Farray array could be...
  7. Replies
    4
    Views
    1,081

    Aside from the preprocessor issue, what is the...

    Aside from the preprocessor issue, what is the value of x? You didn't specify. In your code, you actually use testNeg(x) instead of something like testNeg(b). Maybe it was just a typo, but that...
  8. Replies
    4
    Views
    1,007

    Salem is correct. Depending on the material...

    Salem is correct. Depending on the material you're reading, you may see them more often than you might have expected. Anyway, it's really just the old way to define a function:

    parse(buf, args)...
  9. That's exactly the problem. Also, scanf() is...

    That's exactly the problem. Also, scanf() is generally abhorred due to various problems. See Question 12.19 of the C FAQ for an example of what WaltP was referrring to, and Question 12.20 for some...
Results 1 to 9 of 9