Search:

Type: Posts; User: cashmerelc

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,037

    Sorting an array

    I have looked through the forums for a problem similar to mine but given the specifics of my particular assignment, none of the posts (that I've seen so far) have similar structures.

    I have an...
  2. Replies
    10
    Views
    58,855

    I see, hk, that makes sense. I've made a...

    I see, hk, that makes sense.


    I've made a few changes to my code and I'm getting a new compiler error.

    passing arg 1 of `fgets' makes pointer from integer without a cast

    The user is...
  3. Replies
    10
    Views
    58,855

    Ah, thank you MacGyver, it didn't occur to me...

    Ah, thank you MacGyver, it didn't occur to me that I had to compile both .c files. Thanks man
  4. Replies
    10
    Views
    58,855

    Calling function in another file

    I am writing a program that takes integers from a user and sorts them in ascending order. I understand the process of most of the steps but our teacher has said that the actual function that...
  5. Replies
    6
    Views
    3,941

    Okay, I have written out some code that puts...

    Okay, I have written out some code that puts together several small strings into one long one, but the -1 character only seems to have an effect if you happen to make the -1 the 1st, 2nd, 3rd, 6th,...
  6. Replies
    6
    Views
    3,941

    Separate long string into multiple arrays

    I have a program to write where a user enters up to 10 strings, ending the input with -1 to let the program know the user is finished. Then takes those strings and compares them to remove...
  7. Replies
    6
    Views
    1,608

    This is what I currently have. I've been messing...

    This is what I currently have. I've been messing with declarations and things just to see if it makes any difference, so I know the type identifiers are probably all wrong.


    void sub_sum(float...
  8. Replies
    6
    Views
    1,608

    strtod() can be used to parse floats. And...

    strtod() can be used to parse floats. And according to all of the sites I've found explaining the function, it is of the format:

    strtod(const char *nptr, char **endptr, base)

    so assuming nptr...
  9. Replies
    6
    Views
    1,608

    Okay, using strtok(a, b), the command will search...

    Okay, using strtok(a, b), the command will search through a to find a character that doesn't match what is in b and then turns the character after that into a null character.

    so if a = 1.000+2i,...
  10. Replies
    6
    Views
    1,608

    Storing components of a complex number

    I'm writing a program in which a user enters a complex number (a + bi). I need to store the real numbers a and b in floating points *x1 and *i1 respectively but I'm having a hard time figuring out...
  11. Replies
    6
    Views
    1,919

    Yeah, do I need to use the && operator between...

    Yeah, do I need to use the && operator between them?
  12. Replies
    6
    Views
    1,919

    p1.c:121: error: conflicting types for...

    p1.c:121: error: conflicting types for 'checkWinner'


    And the error is on line 121, which is actually the line:

    char checkWinner(char cell[])
  13. Replies
    6
    Views
    1,919

    Function return value conflict

    I'm writing a tic tac toe program and I have a problem with the function that determines whether or not there is a winner. When I try to compile, it gives me an error saying there are conflicting...
  14. Replies
    1
    Views
    791

    Function calling

    I have a menu driven program that should point towards several functions depending on the user's input.

    One of the functions is supposed to prompt the user to enter a string and then determine...
  15. Replies
    7
    Views
    17,841

    Okay, I have the program more or less written but...

    Okay, I have the program more or less written but the output shows nothing but zeros for the two prime numbers being added.

    i.e.

    4 = 0 + 0
    6 = 0 + 0
    etc..

    Here is my code:
  16. Replies
    7
    Views
    17,841

    Goldbach's Conjecture

    I have been tasked with writing a program that allows a user to input a lower bound and an upper bound so the program can show that every even number between the two is the sum of two primes.
    ...
  17. Replies
    2
    Views
    1,251

    Yeah, that makes sense. Thanks mike

    Yeah, that makes sense. Thanks mike
  18. Replies
    2
    Views
    1,251

    I have a question about...

    <<split from here>>

    I have a question about the following code:



    int x = 0, y = 1, z;
    int i;

    for ( i = 0; i < 10; i++ ) {
  19. Replies
    5
    Views
    2,120

    That works perfect, thanks man. That was driving...

    That works perfect, thanks man. That was driving me nuts. :)
  20. Replies
    5
    Views
    2,120

    Alright, I nested some ifs else ifs into the...

    Alright, I nested some ifs else ifs into the switch, which isn't a short series like you advised but I don't know how else to do it.

    The program I'm writing allows the user to input a two digit...
  21. Replies
    5
    Views
    2,120

    Question about switch cases

    When you have a list of cases in a switch function can you nest ifs and things of that nature in a single case?
  22. Replies
    4
    Views
    7,630

    using the && method worked, thanks for your...

    using the && method worked, thanks for your suggestion, greatly appreciated.
  23. Replies
    4
    Views
    7,630

    Problem with ascending order Program

    Alright, I have written a program for class that allows the user to input three integers then sorts then and prints them in ascending order.

    It works sometimes but sometimes it prints strange...
  24. Replies
    4
    Views
    1,224

    Yeah, right after I asked the question I noticed...

    Yeah, right after I asked the question I noticed that guy's thread. Sorry about posting a similar one.

    /me takes time to check first next time
  25. Replies
    4
    Views
    1,224

    Now that you pointed it out, that seems like an...

    Now that you pointed it out, that seems like an obvious mistake. *slaps forehead*

    Thank you very much for the help!
Results 1 to 25 of 26
Page 1 of 2 1 2