The collected works of frood

DLazlo wrote: For those who haven't heard but might find it interesting, Dominic Giampaolo, the man who wrote the book "Practical File System Design with the Be File System", and of course also designed the wonderful file system and atributes that make working in BeOS so nice, was before he went to Be, Inc. was employed at Silicon Graphics as a software engineer.


That's true. Actually, XFS and BeFS are pretty similar except IRIX doesn't take full advantage of its potential unlike BeOS.
I've been waiting for an Indy to appear on ebay UK for what feels like forever!

Has anyone who lives in the UK got an Indy they're willing to sell me?
Thanks guys! I'm afraid I can't collect and I'm a bit worried about import duty and shipping costs to have one delivered from outside the UK
fieldframe wrote: What spec are you looking for? I have an R4400SC 150MHz here that I can live without.
24 bit XL graphics, 2x 2GB drives, RAM negotiable.


That sounds good, though i've not been following the prices on Indy's and there isn't many on ebay at the moment to know how much to offer. Can anyone give me some help?
I know there is no import duty when shipping within the EU, its the shipping costs that would break me there. I just added that in as a more general comment to those outside the EU on this board.
Weird. I tried paying with Paypal and it said "Credit Cards are not accepted" and wants me to use my bank account...
What about cafepress? I've run off plenty of copyrighted logos on mugs from there.
I'm jealous.
I wanted to pass a multi-dimensional array to a function in C. As in, directly manipulate the contents of an array passed as a parameter.

After many hours of messing around with pointers and getting nowhere, I decided maybe I was trying to be too complicated and tried the following :

Code: Select all

#include <stdio.h>

void changeArray(int testarray[2][2])
{
testarray[1][1]=3;
}

void changeInt(int test)
{
test=4;
}


int main()
{
int array[2][2] = { {1,1}, {1,1} };
int myint=1;

printf("%i %i\n",array[1][1],myint);
changeArray(array);
changeInt(myint);
printf("%i %i\n",array[1][1],myint);


}


Sure enough, the result was :

Code: Select all

$ ./PointerTest
1 1
3 1
$


myint works as I expected C to work. What I don't understand is why the multi-dimensional array is treated differently?

Thanks for any help you can give.
Thank you both for your replies. So, how would I pass a multi-dimensional array of unknown dimensions to a function? Using [][]?