Search:

Type: Posts; User: vexed

Search: Search took 0.00 seconds.

  1. Thread: Pointer help

    by vexed
    Replies
    6
    Views
    1,005

    Thanks guys you helped me solve the problem. You...

    Thanks guys you helped me solve the problem. You were right, I need to update the values at the location given using the bcopy function.
  2. Thread: Pointer help

    by vexed
    Replies
    6
    Views
    1,005

    readThis( addr, &thisbuf ); Is this not...

    readThis( addr, &thisbuf );


    Is this not passing by reference? The value of "thisBuf" is changed once to the value read from read( infd, mybuf, PAGESIZE). Sorry if I'm a little slow to catching...
  3. Thread: Pointer help

    by vexed
    Replies
    6
    Views
    1,005

    I'm not allowed to modify the original...

    I'm not allowed to modify the original listArtists() function in any way. With the original seek and read (reading from the original addr as opposed to rootAddr) the thisRead() function works as...
  4. Thread: Pointer help

    by vexed
    Replies
    6
    Views
    1,005

    Pointer help

    I need help understanding why my pointer doesn't update


    int readThis( unsigned int addr, void* mybuf ) {

    lseek( infd, rootAddr, SEEK_SET ); // root Addr calculation omitted from thread
    ...
  5. Thread: Debugging error

    by vexed
    Replies
    3
    Views
    1,603

    Thank you! Can't believe I couldn't spot that.

    Thank you! Can't believe I couldn't spot that.
  6. Thread: Debugging error

    by vexed
    Replies
    5
    Views
    1,780

    Sorry I accidentally posted twice, once without...

    Sorry I accidentally posted twice, once without code.
  7. Thread: Debugging error

    by vexed
    Replies
    3
    Views
    1,603

    Debugging error

    I get the following error code:

    error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’

    for the code below:



    typdef struct {
    char data[1024];
  8. Thread: Debugging error

    by vexed
    Replies
    5
    Views
    1,780

    Debugging error

    I get the following error code: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
  9. Thanks for the responses! After thinking about...

    Thanks for the responses! After thinking about prototype/definition, I looked into my header file and realized that the prototype for function methodA was incorrectly written as described in...
  10. I meant in the general case. For instance: If...

    I meant in the general case. For instance:

    If given a methodA, declared here:

    methodA(Pointer* p, int a) {
    }

    And a methodB that calls methodA:

    methodB() {
  11. Passing an int as an parameter for a pointer argument

    I was debugging my program and I accidentally pointed an int as a parameter for a pointer object. Am I wrong in thinking doing this should issue a warning by the compiler?
  12. Replies
    8
    Views
    1,407

    Thank you for all the replies! They really...

    Thank you for all the replies! They really clarified things for me. You were right, I mistakenly wrote one of the source .c files as a .o and thus the linker simply could not find the .c file. ...
  13. Replies
    8
    Views
    1,407

    I'm sorry I don't completely understand. Would...

    I'm sorry I don't completely understand. Would it be impossible for one x.o object to depend on another y.o object? What if x.o called a function in y.o?

    I have another question as well. As I'm...
  14. Replies
    8
    Views
    1,407

    Both sort of. In my makefile, if I were to have,...

    Both sort of. In my makefile, if I were to have, for example:

    A program that depends on list.o, list1.o and list2.o

    list.o depended on list2.o

    list1.o also depended on list2.o

    Would a...
  15. Replies
    8
    Views
    1,407

    Makefile question

    I'm pretty confused about makefiles. From what I understand, makefiles can quicken the compilation process by ordering the dependencies in a fashion where the entire program doesn't need to get...
Results 1 to 15 of 15