Search:

Type: Posts; User: daluu

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Use of threads or state machines to synchronize command execution

    Hi,

    I have a question (or need for advice) on thread programming that isn't covered by the

    conventional tutorials.

    I'm a newbie to thread programming. I only worked on one lab project...
  2. Thanks a lot for your help. I just had it in my...

    Thanks a lot for your help. I just had it in my mind that the left parenthesis was supposed to be removed in my code already--hate it when one fails to get past his/her assumptions on code reviews.
  3. fixed calculator but still parenthesis issue

    Thanks for the pointers Salem. The calculator is now fixed. I was so tired I probably overlooked the stack logic mismatch.



    Now for the parenthesis, can you elaborate if that is the issue? The...
  4. problem with infix 2 postfix converter & postfix calculator

    This is in regards to a class lab project on building a top down parser using flex in Linux as scanner/lexer and parser should convert valid infix expressions to postfix & calculate the result of the...
  5. Replies
    8
    Views
    3,203

    thanks for the input. I ended up defining the...

    thanks for the input. I ended up defining the functions differently to get it to work.
  6. Replies
    8
    Views
    3,203

    the (simulated OS) code uses ints for parameter...

    the (simulated OS) code uses ints for parameter passing across the system. the simulated registers for storing data hold ints, I believe.

    what i posted is what I intended to do. Is there an...
  7. Replies
    8
    Views
    3,203

    typecasting data for parameter passing

    See code below. Due to # of parameter passing limitations, I would like to pass a structure holding a set of parameters to a function as a single parameter and then the function would know how to...
  8. thanks for the info. and from that info, if...

    thanks for the info. and from that info, if "test" was not a pointer to the instance but rather the instance itself, the call to Remove would be



    test->Remove(5);

    right?

    I didn't realize...
  9. never seen a type *fnc (params); before, need clarification on use

    I've never seen something like:


    class IdClass {
    public:
    IdClass(); // initialize the list
    ~IdClass(); // de-allocate the list

    void Add (void *item, int Key); // Put item...
  10. Replies
    7
    Views
    7,028

    pardon the possibly messy code, it's in testing...

    pardon the possibly messy code, it's in testing phase:


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

    /*fncs*/
    long FileSize (FILE *stream);
    void readfirst(char* buffer);
  11. Replies
    7
    Views
    7,028

    update on the program - swaphalves() problem

    I looked over my code and refined it as best I could. I pinpointed the problem to swaphalves(). my buffer read & write functions are ok.

    for an input file content of: todo
    (which is 4 bytes)
    ...
  12. Replies
    10
    Views
    6,405

    quzah, I know that but I'm not good at passing...

    quzah, I know that but I'm not good at passing addresses of members within a structure. If pid were by itself I would use &pid. But how do I do it within the context of plist->pid?

    I guess I can...
  13. Replies
    10
    Views
    6,405

    ??? so you mean I should use "pcb" for...

    ??? so you mean I should use "pcb" for typecasting or rename PCB to remove possible confusions?
  14. Replies
    7
    Views
    7,028

    yes, it's a mix of C & C++, technically. I know,...

    yes, it's a mix of C & C++, technically. I know, I know that's bad...
  15. Replies
    10
    Views
    6,405

    Using fscanf with a structure

    I don't really use fscanf, so I need some help here.

    I need to read in data from file like this:
    A 0 7 B 24 67 C 67 6 D 82 9 E ...

    letters should be char & #s be int, and I'm using this...
  16. Replies
    7
    Views
    7,028

    buffer contents swapping

    I need another pair of eyes, etc. to review my code for logic errors.

    Here's what the program should do:
    1. read in half of input file to buffer
    2. read last half BUT swap each byte read with...
  17. Unfortunately, the project lists recursion as a...

    Unfortunately, the project lists recursion as a requirement.

    Regarding the use of a queue. Kind of fuzzy as how to make use of that. Additionally, wouldn't placing children nodes (or just...
  18. displaying B-tree in tree traversal order/1 level at a time

    I've written code for displaying a B-tree in tree traversal order or 1 level of the B-tree at a time. However, I my code is not implemented as it should. It only works logically for a B-tree of level...
  19. Salem, for some reason, your code suggestion...

    Salem,

    for some reason, your code suggestion partially works. Could it be how the rest of the programs functions are implemented? Since the index read/write functions were implemented as I thought...
  20. thanks for the suggestions, Salem. A few quick...

    thanks for the suggestions, Salem. A few quick things tho:

    I was thinking when using realloc, assigning the reallocation to the original array was ok, thus, bypassing a temp variable. And I...
  21. well, so far in my classes, I haven't had the...

    well, so far in my classes, I haven't had the opportunity to learn how to use vectors. And a quick search of the web got me nowhere. Do you know of any sites with info on using vectors?

    As for...
  22. need other's perspective in reviewing array shifting & sorting functions

    Couldn't find the errors initially & yet for both sets of code, so need someone else's perspective.


    1) Does this function work OK in shifting an array of index entries for a new entry?


    ...
  23. Thread: long values

    by daluu
    Replies
    4
    Views
    1,456

    thanks. ;-)

    thanks. ;-)
  24. Thread: long values

    by daluu
    Replies
    4
    Views
    1,456

    i see there are a number of page views. why...

    i see there are a number of page views. why hasn't anyone responded?
  25. Thread: long values

    by daluu
    Replies
    4
    Views
    1,456

    long values

    I'm not very familiar with long values, other than it being a form of numbers like integers, so:

    is the long value 2L equate to simply 2 base type long, or something more?

    if so then wouldn't...
Results 1 to 25 of 45
Page 1 of 2 1 2