No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
Re: Divide 'changeValue' by 'coinValue' and store it in a variable like 'numOfCoins' - this is the value to be returned by the function. Before returning 'numOfCoins', update 'changeValue' by subtracting the product of 'numOfCoins' and 'coinValue' from it. Although I think the function should just take the 'changeValue' arguement and … | |
I have a program that works fine under windows, but when i run it on Unix I get a very slightly diffent set of results, followed by a 'segmentation fault' message. I'm at a loss to explain why. Any ideas? | |
I've a 2-d array declared as such [CODE]lower_tri = (float **)malloc(sizeof(float *)*(dimention)); for(i =0; i < dimention; ++i) lower_tri[i] = (float *)malloc(sizeof(float)*(i+1));[/CODE] So that it looks like... [] [][] [][][] [][][][] ... However, it causes a segmentation fault when I try to de-allocate the array with [CODE]free(lower_tri);[/CODE] (only in unix, … | |
I'm working on a C program that needs a lot of dynamic memory allocation of 1-D and 2-D arrays. The program works fine when I compile and run it using windows and Visual C++, but when I compile and run it in a Unix environment, I get slightly different results, … |
The End.