No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
For the sake of readability, I've been trying to do something like this: [CODE]#define initialize(x)(type x = initfunction()) int main(){ initialize(example); example.item = 0; return 0; }[/CODE] where type is a typedef'd struct, and initfunction() generates one, inits values, and returns it. My problem is, I get these errors: warning: … | |
I've got a large array of coordinates (a struct containing x and y, among other things) and for each pair of coordinates, I'm trying to find another pair that's closest to it from that array. [code] int i, j, d = 0, cd = 0, closest; for(i=0;i<size;i++){ closest = 0; … |