Search:

Type: Posts; User: Ryan.

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    4,326

    Wow guys, that was pseudocode -- not actual code...

    Wow guys, that was pseudocode -- not actual code (I thought this was clear when I said "In a nutshell" and considering it made no sense and would never compile as actual code.) I didn't want to post...
  2. Replies
    9
    Views
    4,326

    Can't change variable from another function...

    I have a function foo()

    foo has a local variable var

    I want to change var from inside another function

    Thus, I figured I would do a call to the other function with &var and then change var...
  3. Replies
    8
    Views
    4,556

    To quote myself: "That said, I think the above...

    To quote myself: "That said, I think the above was way wrong."

    I was confused myself, hence...



    Thanks for the advice. I actually had the linked list version laying around before I wrote...
  4. Replies
    8
    Views
    4,556

    Isn't that pretty much what I am doing? Minus...

    Isn't that pretty much what I am doing? Minus the free, since this is assembly.

    And there is no tail reference.
  5. Replies
    8
    Views
    4,556

    The actual problem I am dealing with in assembly...

    The actual problem I am dealing with in assembly is a linked list. I just made an array for modelling purposes because it is easier to translate into MIPS assembly. Assembly is rather annoying when...
  6. Replies
    8
    Views
    4,556

    Removing odd indicies from linked list

    Hello...

    I have a solution to this problem, but I think it is too complicated to be optimal. I need it as simple as possible before I start coding it in assembly.

    Here is what I am given (v's...
  7. Figured out the warnings. Thanks again.

    Figured out the warnings. Thanks again.
  8. Thanks so much. I spent so much time trying to...

    Thanks so much. I spent so much time trying to figure that out...

    As for the malloc / free's, I have no idea how to fix them. Everything seems to work, though... this is just test code for...
  9. Scope error: ‘[var]’ undeclared (first use in this function)

    Anybody know what I am doing wrong? I have been trying to compile this simple file for like an hour... and Google was no help in solving the mystery.

    Troublesome code is highlighted.

    Main...
  10. Replies
    15
    Views
    2,930

    Thanks for your input. I am probably going to be...

    Thanks for your input. I am probably going to be marked down for not using free. Is it possible you can you explain more clearly what you mean by "close argv, modify it, and then pass it to the...
  11. Replies
    15
    Views
    2,930

    Forget it. This loop fixed the assignment ...

    Forget it.

    This loop fixed the assignment



    for ( i = 0; i < *num_words_ptr; i++ )
    argv[ i ] = str_tokens[ i ] ;
  12. Replies
    15
    Views
    2,930

    I thought I fixed it, but apparently not. I...

    I thought I fixed it, but apparently not.

    I have it 90% working, but I still have the issue with main's args that need to change.

    Instead of being vague, this time I am going to be very...
  13. Replies
    15
    Views
    2,930

    I did not understand correctly how main handled...

    I did not understand correctly how main handled the function. When I finally understood (this morning), it took me 1 hour to code it and get it working. I have spent over 20 hours on it approaching...
  14. Replies
    15
    Views
    2,930

    Everything in the package is linked to argv......

    Everything in the package is linked to argv... the assignment specifically requires us to modify argv.
  15. Replies
    15
    Views
    2,930

    There are problems with that. For one,...

    There are problems with that.

    For one, saved_args doesn't contain everything argv does -- it is not a 1:1 map

    Secondly, the program package uses argv, so I have to change that directly (or...
  16. Replies
    15
    Views
    2,930

    Pointer to pointer assignment? PLEASE HELP!!!

    I am. Going. Freaking. Crazy. I searched all over for a solution, and cannot find one. Please don't harp on me if you can find one in like 30 seconds -- maybe I suck at search.

    This is, plain...
Results 1 to 16 of 16