Search:

Type: Posts; User: MiroMage

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    4,956

    Oh! Alright, sorry about that, I get it now. ...

    Oh! Alright, sorry about that, I get it now.

    Thanks!
  2. Replies
    8
    Views
    4,956

    Well, I changed some stuff around to make a...

    Well, I changed some stuff around to make a little better sense, but I'm still not getting anything to change...

    I don't think I'm quite seeing what's going wrong.


    void uppercase(char*...
  3. Replies
    8
    Views
    4,956

    So it would be something like this? void...

    So it would be something like this?


    void uppercase(char* checkword)
    {
    char c = 'N';

    if(checkword[0] == isupper(c))
    tolower(c);
    }
  4. Replies
    8
    Views
    4,956

    Capital Letters?

    My program is supposed to read in strings and compare them to words in a "dictionary" (basically a spell checker). However, if a word starts with a capital letter, I'm supposed to change that letter...
  5. Replies
    6
    Views
    1,590

    I changed my loop in my print function to this: ...

    I changed my loop in my print function to this:


    for(i = q->front; i < q->back; i++)
    {
    printf("%d ", q->store[i]);
    q->front = (q->front + 1) % q->size;
    }
    ...
  6. Replies
    3
    Views
    8,056

    How are you getting yours to print that way? When...

    How are you getting yours to print that way? When I changed my loop like that all it printed for me was a new line...
  7. Replies
    6
    Views
    1,590

    hm.. alright. Thanks. I'll have to play with it...

    hm.. alright. Thanks. I'll have to play with it because when I changed it to stop at q->back, it didn't print anything. Just a new line.
  8. Replies
    6
    Views
    1,590

    Even if I cut it down, I still can't get it to...

    Even if I cut it down, I still can't get it to work right. I made it a little shorter here:


    int remove_car(struct train* q)
    {
    int val = q->store[q->front];

    if(q->front + 1 ==...
  9. Replies
    6
    Views
    1,590

    dequeueing issues

    The last part of my program is supposed to be able to remove one item from a queue at the top of a stack, but stop if there is only one item left in the queue. I can't figure out how to make it stop...
  10. Replies
    5
    Views
    3,136

    Ah, alright. Thanks a lot! And the way it is...

    Ah, alright. Thanks a lot! And the way it is stored on the stack will only store it once, right? Because when I put in a print function, it printed the second queue twice, the third queue three...
  11. Replies
    5
    Views
    3,136

    ^^ I figured I would need to make it so that I...

    ^^ I figured I would need to make it so that I have a stack of queues, but I'm not sure how to put that into code. It would have to be something in the function when I create the stack, right? I'm...
  12. Replies
    5
    Views
    3,136

    Pushing a Queue onto a Stack?

    The basic idea of this program is to keep track of different trains that come into a train station, and store each train's car number in a queue. The last train to enter must be the first train to...
  13. Thread: coin flipping

    by MiroMage
    Replies
    5
    Views
    5,277

    I think I see what you're saying. I'll give it a...

    I think I see what you're saying. I'll give it a try and see what I can come up with. Thanks!
  14. Thread: coin flipping

    by MiroMage
    Replies
    5
    Views
    5,277

    coin flipping

    I'm supposed to write a program that uses recursive functions to print out all the possible outcomes when flipping a coin 'n' times. I've been told to try a binary tree, but we haven't learned those...
  15. Thread: Square Roots?

    by MiroMage
    Replies
    6
    Views
    2,408

    Oh wow. Haha. Thanks guys. I can't believe I...

    Oh wow. Haha. Thanks guys. I can't believe I didn't see that.

    It's been a long night. Thanks again. ^_^
  16. Thread: Square Roots?

    by MiroMage
    Replies
    6
    Views
    2,408

    Oh, sorry. The number is getting passed into the...

    Oh, sorry. The number is getting passed into the high value. Here is my main:


    double square_root(double low, double high);

    int main(void)
    {
    float number;
    double root;
  17. Thread: Square Roots?

    by MiroMage
    Replies
    6
    Views
    2,408

    Square Roots?

    We're supposed to write a program that will approximate a square root using a recursive function. For some reason, I cannot get it to return the proper numbers. I ran an error check using some...
  18. Replies
    7
    Views
    1,534

    Alright, I moved the code down into a function,...

    Alright, I moved the code down into a function, and added some room up at the top such as:


    char license[20];
    char make[20];
    char model[20];
    char color[20];

    This allows me to read the...
  19. Replies
    7
    Views
    1,534

    Alright, I changed the !feof and the &name, but...

    Alright, I changed the !feof and the &name, but now it is not reading anything from the file at all. I used this line:


    while(fscanf(fload, "%s %s %d %s %s", make, model, &year, color, license)...
  20. Replies
    7
    Views
    1,534

    Loading files into lists

    I've been working on this for a few days now, and I'm seriously stuck on this function. For this part, I'm supposed to read in a file and create a linked list from the data in the file. I have my...
  21. Replies
    4
    Views
    2,309

    No, we're not the same person, but it does seem...

    No, we're not the same person, but it does seem like we're in the same class. lol

    Even so, looking at theie code does not really help with my issues on inserting into a list...
  22. Replies
    4
    Views
    2,309

    inserting into linked list

    Alright, so I know that I'm supposed to use strcpy for strings, but I just can't get it to work. The program will just crash after entering the first bit of information. Here is the code I have for...
Results 1 to 22 of 22