I have got a question i am working on and this is as follows (with a bunch of constants that aren't relevant)
Use a struct to represent an (x, y) coordinate. A second struct must then be used to represent the sound source — its (x, y) coordinate and the W value. You will also need to declare an appropriate array of struct variables. You may assume that not more the 100 sound sources will be involved in the plant/site being analysed.
This is what i got so far;
struct point
{
double x, y;
};
/* for sound sources */
struct source
{
struct point location;
float power;
};
Is there anyway to rewrite this in a different way? or a 'more correct' way?