Search:

Type: Posts; User: mmcg

Search: Search took 0.01 seconds.

  1. Replies
    45
    Views
    3,523

    What exactly is it your trying to do? I just...

    What exactly is it your trying to do?

    I just wrote a program that has the user input a month, either in English or Spanish, and then translates it and gives the number of days in that month.

    I...
  2. Replies
    45
    Views
    3,523

    To use an element in a structure, you use the...

    To use an element in a structure, you use the following:


    structname.elementname

    So it's the name of the structure, then a fullstop, then the name of the element in the structure. Here's an...
  3. Replies
    45
    Views
    3,523

    Is it just me or are the if and elseif...

    Is it just me or are the if and elseif comparisons in the for loop exactly the same?
  4. Replies
    45
    Views
    3,523

    Use the tolower() function on the string before...

    Use the tolower() function on the string before you compare it, that way whatever case the user enters it in, it'll still compare properly.

    And can structures be passed to a function? I don't...
  5. Replies
    38
    Views
    3,001

    Here you go: It's a better function than...

    Here you go:



    It's a better function than scanf() and gets(), and it'll keep your code as C and not a mixture of C/C++! ;)
  6. Replies
    38
    Views
    3,001

    You could always use fgets()?

    You could always use fgets()?
  7. Thread: Error Help

    by mmcg
    Replies
    4
    Views
    1,028

    And you're main function should end with: ...

    And you're main function should end with:


    return(0);
  8. Replies
    160
    Views
    276,295

    Sticky: I'm nearly finished C For Dummies...

    I'm nearly finished C For Dummies and it's been a very good read. It explains things very well, there's a bit of humour and the pace is very easygoing. Very good book for beginners with no experience...
  9. Replies
    9
    Views
    18,842

    This better? #include #include...

    This better?



    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    float usd;
  10. Replies
    9
    Views
    18,842

    Just knocked this up. I'm pretty new to...

    Just knocked this up. I'm pretty new to programming, been learning C for the past few weeks.



    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    char usdi[32];
Results 1 to 10 of 10