Search:

Type: Posts; User: jerryvtts

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: C Hwk

    by jerryvtts
    Replies
    7
    Views
    1,087

    Technically getsales(int a[13] could be...

    Technically getsales(int a[13] could be getsales(int a[11] since array indexing starts at 0 and he only needs 12 months 0-11. But note that in his while statement month starts at 0 and goes to month...
  2. Thread: C Hwk

    by jerryvtts
    Replies
    7
    Views
    1,087

    I changed your "getsales" function only as an...

    I changed your "getsales" function only as an example. I also printed out the "a" array after the "while" loop just to show that it worked. You can take out the three lines that do this.

    Note...
  3. Replies
    5
    Views
    961

    Hammer is of course correct which tells me if...

    Hammer is of course correct which tells me if you're going to answer questions in this forum you had better try it on more than
    one platform or you will get "THE HAMMER"
  4. Replies
    7
    Views
    776

    %d in printf does indeed specify an integer so...

    %d in printf does indeed specify an integer so the "&" is not needed. I always say " the address of" when I type code that
    contains the "&" with a variable. Seems to help me.

    There are many...
  5. Replies
    5
    Views
    961

    There must be some other problem because I got...

    There must be some other problem because I got this to compile and run with turbo C.




    #include <stdio.h>

    int main(void)
    {
    char *pointer = "hello";
  6. Thread: fd copy

    by jerryvtts
    Replies
    12
    Views
    2,645

    How about posting your #include files and I'll...

    How about posting your #include files and I'll see if I can get it to work.
  7. Replies
    1
    Views
    923

    What compiler are you using? It should have given...

    What compiler are you using? It should have given you a warning about the following line like "Possibly incorrect assignment......".

    You actually need two equal signs here ortherwise you are...
  8. Thread: turbo c 2.01

    by jerryvtts
    Replies
    5
    Views
    3,244

    I have a really old version of Turbo C and I got...

    I have a really old version of Turbo C and I got this to work.



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

    int main(void)
    {
  9. Replies
    3
    Views
    1,021

    Here's a real simple version of how to do this....

    Here's a real simple version of how to do this.
    Hope it helps.



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

    int main(void)
  10. Replies
    10
    Views
    9,804

    In my opinion hardware engineers can usually...

    In my opinion hardware engineers can usually write some
    software but software engineers can't design hardware.
    The person who can do both proficiently is the most
    valuable and makes the most...
  11. Replies
    4
    Views
    8,620

    I got your magic box program to work. Here's the...

    I got your magic box program to work. Here's the working version
    with a couple of comments to show you what I did. I did some reformatting of your source code because it's the only way I could...
  12. Thread: extraction

    by jerryvtts
    Replies
    13
    Views
    1,207

    Also, this isn't going anywhere: ...

    Also, this isn't going anywhere:
    >while(input[n++]!='\0')
    >{
    >switch(input[n])

    Hammer. this was my fault. It should have been:



    while(input[n]!='\0')
  13. Replies
    2
    Views
    750

    I ran your program and it worked fine. Here's...

    I ran your program and it worked fine.
    Here's what the screen looked like after all entries:

    Welcome to "Weather Wizard" Unit Convertor!
    Please enter values in 'ENGLISH' units:
    Enter Fahrenheit...
  14. Thread: extraction

    by jerryvtts
    Replies
    13
    Views
    1,207

    Note that sscanf isn't an ordinary method or...

    Note that sscanf isn't an ordinary method or built-in function, but a very special construction in Pike. The reason is that sscanf has to change its arguments, and since Pike uses call-by-value, no...
  15. Thread: Whats wrong?

    by jerryvtts
    Replies
    6
    Views
    1,660

    I can't quite figure out what your program is...

    I can't quite figure out what your program is trying to do
    but CTRL+C is a dangerous thing to ask the user to type.

    When the console server detects a CTRL+C it terminates the
    execution of the...
  16. Thread: To Hammer

    by jerryvtts
    Replies
    7
    Views
    1,051

    OH I get it! Thanks

    OH I get it!

    Thanks
  17. Thread: bit shifting

    by jerryvtts
    Replies
    4
    Views
    1,214

    shift/fill warning. The shift operators

    shift/fill warning.

    The shift operators << and >> perform left and right shifts of their left
    operand by the number of bit positions given by the left operand.
    Thus x << 2 shifts the value of...
  18. Thread: To Hammer

    by jerryvtts
    Replies
    7
    Views
    1,051

    To Hammer

    jerry, please can you use code tags for the code (see my sig for an example). It helps make the code readable by keeping the layout as it is in your editor. Thanks.



    Hammer could you please...
  19. Thread: extraction

    by jerryvtts
    Replies
    13
    Views
    1,207

    As i've learned from this forum you should use...

    As i've learned from this forum you should use "fgets" instead of "gets".

    You have the right idea but it can be done with a lot less code(work).

    Here's some streamlined code that will do what...
  20. Replies
    7
    Views
    1,598

    getchar() reads a character from the standard...

    getchar() reads a character from the standard input, usually the
    keyboard. getchar will also 'echo" the typed character to the standard output, usually the user screen.


    I couldn't tell...
  21. Replies
    5
    Views
    1,026

    You're trying to take in an integer and check it...

    You're trying to take in an integer and check it in the "switch" against an ascii character. You should have been able to find this
    problem with a debug session.

    Try the following:


    ...
  22. Replies
    16
    Views
    1,319

    No 8's or 9's sounds like you want to work in...

    No 8's or 9's sounds like you want to work in octal(base 8). If this is the case take in any numbers from the user and use:

    // Code
    printf("%o", number);

    to display it.
  23. Thread: gets debug

    by jerryvtts
    Replies
    1
    Views
    787

    gets debug

    Well I guess I'm too isolated from the real world to know about the
    long known problems with "gets".

    I debugged this on my PC not on Unix.

    I loaded a real old version of TC to get the...
  24. Replies
    4
    Views
    844

    gets controversary

    I direct this thread spacifically to Sebastiani, Hammer or Prelude
    who seem to know their C code.

    I'm new to this forum and I note that several contributers don't like
    the "gets" command. I...
  25. Replies
    7
    Views
    2,973

    string parcer

    If you're going to write C you have to do most of the work to make sure the user enters the expectes data. I agree with the
    response that said you should take in the date 12/34/56 and then
    parse...
Results 1 to 25 of 28
Page 1 of 2 1 2