Search:

Type: Posts; User: samf

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    37,712

    case 3: Printf("How...

    case 3:
    Printf("How much would you like to Withdraw?");


    C is case sensitive. Printf should be all lowercase letters.
  2. Replies
    3
    Views
    1,549

    You could also look into using strcasecmp,...

    You could also look into using
    strcasecmp, strncasecmp - case-insensitive string comparisons
  3. Replies
    4
    Views
    10,164

    Depending on your version of Oracle, you can get...

    Depending on your version of Oracle, you can get the documentation from the Oracle web site.

    These are for version Oracle 10
    Pro*C/C++ Getting Started for Microsoft Windows (32-Bit)

    Pro*C/C++...
  4. Thread: Futurama Theorem

    by samf
    Replies
    48
    Views
    7,547

    Isn't this really a variation on Tower of Hanoi -...

    Isn't this really a variation on Tower of Hanoi - Wikipedia, the free encyclopedia
  5. Replies
    12
    Views
    4,244

    Don't panic. You are so close! :) You have to...

    Don't panic. You are so close! :)

    You have to tackle this one problem at a time.

    When you compile this you probably received a warning about too many arguments for format. You need to put a...
  6. Replies
    12
    Views
    4,244

    Just follow laserlight's advice: You'll need a...

    Just follow laserlight's advice:

    You'll need a variable for each of the items laserlight detailed.

    For example:

    int oddNumberCount;
    int evenNumberCount;
    int totalEntered; /* total number...
  7. Replies
    12
    Views
    4,244

    in = fopen ("integars.dat", "r"); It would...

    in = fopen ("integars.dat", "r");


    It would also be a good idea of getting into the habit of checking the return value when opening a file.



    #include <string.h>
    #include <errno.h>...
  8. Thread: c program

    by samf
    Replies
    3
    Views
    1,427

    Are you sitting in class during a test asking us...

    Are you sitting in class during a test asking us these questions?

    For, While and Do While Loops in C - Cprogramming.com
  9. Replies
    4
    Views
    2,446

    What are expecting to see?

    What are expecting to see?
  10. Replies
    7
    Views
    8,888

    My guess is that route_discovery is causing a...

    My guess is that route_discovery is causing a corruption of the value in route_size. You pass the address of the route_size variable which allows route_discovery to manipulate the value it points...
  11. Replies
    13
    Views
    1,250

    Try looking here... Cprogramming.com Tutorial:...

    Try looking here...

    Cprogramming.com Tutorial: If Statements
  12. Replies
    13
    Views
    1,250

    What is being evaluated as true is not the first...

    What is being evaluated as true is not the first part, but the second part.


    if ( user_input[0] == 'A' || 'a' ) {

    'a' will always be true, so when you say || 'a' you are always making a true...
  13. Replies
    13
    Views
    1,250

    That's because you are trying to do a string...

    That's because you are trying to do a string comparison on a character field. Try using single quotes, not double quotes. Also, user_input is a string array. Try using user_input[0] or...
  14. Replies
    6
    Views
    5,161

    I think because you only give three variables as...

    I think because you only give three variables as bind parameters when you actually use 8 in your OPEN statement.


    EXEC SQL OPEN TRM4_CUR USING :qrtDtebegin, :qrtDtelast, :dteRun;

    In Pro*C,...
  15. Replies
    6
    Views
    1,530

    You may want to go over the syntax of the if...

    You may want to go over the syntax of the if command again to see why the semi-colons, as they are placed in this example, is not appropriate.

    Cprogramming.com Tutorial: If Statements
  16. Replies
    10
    Views
    2,894

    Does your instructor mean for you to create a...

    Does your instructor mean for you to create a program that would take a file and send the output to stdout? Most programs that can accept stdin data can have its data piped into it via shell...
  17. Replies
    24
    Views
    3,968

    How are you running this in DOS? Are you...

    How are you running this in DOS? Are you submitting it from a Windows GUI IDE? Have you tried running it from a DOS command prompt independent from the IDE? Perhaps it is your IDE that is...
  18. Replies
    6
    Views
    1,530

    Remove the ';' (semi-colon) after the while ...

    Remove the ';' (semi-colon) after the while


    while( lives > 0);

    should be


    while( lives > 0)
  19. Replies
    10
    Views
    2,894

    It doesn't matter what you took previously. A...

    It doesn't matter what you took previously. A first class in a new language does not usually begin with piping until you have mastered other basic concepts like conditions, looping, etc.

    If you...
  20. Replies
    10
    Views
    2,894

    Piping after only two weeks of class? I find it...

    Piping after only two weeks of class? I find it hard to believe that a more advanced subject is being given so early in a course. Are you sure your instructor said to use piping in a 'C' program? ...
  21. Replies
    11
    Views
    4,226

    As jeffcobb stated previously, please ask these...

    As jeffcobb stated previously, please ask these questions on a Linux/Shell forum.

    This is an excellent one: Shell Programming and Scripting - The UNIX and Linux Forums
  22. Replies
    6
    Views
    1,594

    Salem is right. You may also want to add ...

    Salem is right. You may also want to add
    #include <string.h>
    I would also consider moving


    printf("the age of emp1 is: %s\n", emp1.name);
    printf("the age of emp1 is: %s\n", emp1.address);...
  23. Replies
    14
    Views
    2,876

    If you are really paranoid about such stuff, you...

    If you are really paranoid about such stuff, you can try snprintf. But calling snprintf is probably more expensive than calling the string copy functions.


    int snprintf(char *restrict s, size_t...
  24. Replies
    4
    Views
    1,593

    Try this: char mystrcat(char *, char *);

    Try this:


    char mystrcat(char *, char *);
  25. Replies
    8
    Views
    12,430

    You don't know for sure what's causing the error...

    You don't know for sure what's causing the error unless you print the error message fopen is kicking out. Use perror or print errno in some fashion:

    e.g.


    if ( (fp_out = fopen("myfile.dat",...
Results 1 to 25 of 59
Page 1 of 3 1 2 3