It's been a long time since I've sat at the computer as a programmer, 
so pardon me if this is programming 101.

What I've got is an array of structs, something like this:

[CODE]
struct Note
{
    int nPitch;
    int nDuration;
};

Note noteMelody[4][10];
[/CODE]

1) I have a function that writes random data to each member of each 
struct in the array.  The question is, how do I pass the struct to 
this function?  Do I just need a refresher course on calling by 
reference?

2) Can I adjust the size of the array at runtime?

3) Is there a better way to do this than an array of structs?  The 
thing is, each row of the array is one continuous chunk of data (as 
interpreted) - much like a train.  So, I'm going to want to be able 
to swap, say, position [2][4] with [3][4].  Is this a job for linked 
lists?

Thank you in advance for your help.





To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to