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.
Type: Posts; User: vexed
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.
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...
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...
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
...
Thank you! Can't believe I couldn't spot that.
Sorry I accidentally posted twice, once without code.
I get the following error code:
error: expected =, ,, ;, asm or __attribute__ before struct
for the code below:
typdef struct {
char data[1024];
I get the following error code: error: expected =, ,, ;, asm or __attribute__ before struct
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...
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() {
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?
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. ...
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...
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...
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...