Search:

Type: Posts; User: zyphirr

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    3,410

    If I used char, I can only scan literally one...

    If I used char, I can only scan literally one character at a time. For example, I wanted to scan 142 into x, I would have to scan 3 separate chars into separate variables and then convert it to 142....
  2. Replies
    5
    Views
    3,410

    Bug in my code or bug in GCC?

    It's a simple program.



    #include <stdio.h>

    int main (void)
    {
    unsigned char x, y;
  3. Replies
    8
    Views
    1,709

    So, I add name and data to a linked list. I...

    So, I add name and data to a linked list. I need a function to find a specific name.

    Ex. find Smith

    And using the hash table, I look through to find if smith is one of the names I added.
    ...
  4. Replies
    8
    Views
    1,709

    I don't get errors, my program just doesn't do...

    I don't get errors, my program just doesn't do what I want it to.

    I don't know what you mean by changing blocks of data. I don't even know where to start changing.

    The program is too large to...
  5. Replies
    8
    Views
    1,709

    This program is driving my crazy!

    Ok, so I need to use separate chaining hash in this program.

    This is my function that is suppose to add a new hash after the data has been added to the linked list.



    typedef struct node {
    ...
  6. Replies
    1
    Views
    1,690

    Adding a node of struct

    I'm trying to make a linked list, what's wrong with my syntax for adding a node?



    struct data {
    char name[20];
    char number[10];
    };

    typedef struct node {
  7. Replies
    16
    Views
    2,517

    Ok, so say my text file is like this: "The...

    Ok, so say my text file is like this:

    "The great big donkey, who was very
    sad, leap into the pits of hell. Sucks to be him."

    I would use: &#37;20[^\n,. ]

    That's line feeds (\n), commas,...
  8. Replies
    16
    Views
    2,517

    So is there no other way to ignore punctuations?

    So is there no other way to ignore punctuations?
  9. Replies
    16
    Views
    2,517

    How can I use fscanf to read only the first...

    How can I use fscanf to read only the first character of each word in a text file?
  10. Replies
    16
    Views
    2,517

    Ok, thanks. Now, how come %20[a-zA-Z] doesn't...

    Ok, thanks.

    Now, how come %20[a-zA-Z] doesn't work?
  11. Replies
    16
    Views
    2,517

    Here's my code. #include ...

    Here's my code.



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

    int hash(char* s);

    int main(int argc, char **argv)
  12. Replies
    16
    Views
    2,517

    Using that format, my program doesn't seem to be...

    Using that format, my program doesn't seem to be running.

    Without it, it works but terminates with an error after the incorrect output.

    I think it's in some kind of infinite loop.
  13. Replies
    16
    Views
    2,517

    Quick question about fscanf

    When I use:



    fscanf(file, "&#37;20s", word);


    ...to scan a word in a text file, it includes punctuations. Is there a way to make it only alphabets?

    What I'm trying to do is read each word...
  14. works like a dream, with some minor revisions...

    works like a dream, with some minor revisions from master's code.

    Thanks much everyone!
  15. here ya go #include #include...

    here ya go



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define LESS(x,y) ((x).income < (y).income)
    #define EXCH(x,y) { struct elecVotes tmp = x; x = y; y = tmp; }
    #define...
  16. forgot to mention that I changed that too. ...

    forgot to mention that I changed that too.

    still not working...
  17. I didn't use .vote in my code, I noticed that...

    I didn't use .vote in my code, I noticed that master used it, so I changed it.

    I'm using .income, but it still doesn't sort at all.

    In my code, I just print the sorted list into a text file. ...
  18. bleh

    Ok, awesome. No more warnings or errors.

    But...the program isn't doing what it's intended to do.

    The bubSort function is suppose to bubble sort array, which is a struct elecVotes, by the...
  19. um...

    dude, sorry if I didn't make it clear, lol.

    the warnings and errors are in the code as comments

    I thought I'd put it in the code because the code format doesn't have line numbers when I post...
  20. How do I fix these annoying warnings and errors?

    The warnings and errors are in the code as comments on the line they belong to.



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define EXCH(x,y) {struct elecVotes tmp = x; x =...
  21. Replies
    1
    Views
    1,319

    Find a certain bits in an integer array?

    Hello! Ok, here we go.

    If I have an array of unsorted integers, like:

    2342
    12344
    234
    21345
    6788
  22. Thread: C++ to C

    by zyphirr
    Replies
    32
    Views
    5,059

    :)

    No need to post the code Elysia, because I've fixed the errors on the Linux machine.

    This isn't the first time I've had to do it.

    I was contemplating those other options because I want to...
  23. Thread: C++ to C

    by zyphirr
    Replies
    32
    Views
    5,059

    thx

    Thanks for clearing that up Elysia!

    Ok, this is kind of off-topic, maybe.

    So, I'm currently using MS Visual Studio C++ 2008 to write, compile, and test my C programs. (No C++ yet, just C) And...
  24. Thread: C++ to C

    by zyphirr
    Replies
    32
    Views
    5,059

    yes

    Yes, master...

    Tell me, how many times a day do you do this? Help out people like me.

    I think you enjoy making me feel inferior. That's your perk isn't it? Sicko.


    ...
  25. Thread: C++ to C

    by zyphirr
    Replies
    32
    Views
    5,059

    6

    6 more!



    void Move(char caaBoard[3][3], const EMove keMove) {


    errors (from the above line and last line of entire code):
Results 1 to 25 of 31
Page 1 of 2 1 2