crkp
March 10th, 2005, 05:53 PM
In C, how can I initialize an array set to include a user-defined parameter?
For example:
userPattern = userInputStruct->pattern;
dataPattern[] = { userPattern };
Of course, that is not the correct syntax. However, I wanted the contents of userPattern (or the data stored in userInputStruct->pattern), which is inputted by the user at run-time, to populate into the dataPattern array. This is for C programming. I couldn't find a forum for 'C' programming, so thought that perhaps this is where it would fit best.
Thanks for all your help!!!
For example:
userPattern = userInputStruct->pattern;
dataPattern[] = { userPattern };
Of course, that is not the correct syntax. However, I wanted the contents of userPattern (or the data stored in userInputStruct->pattern), which is inputted by the user at run-time, to populate into the dataPattern array. This is for C programming. I couldn't find a forum for 'C' programming, so thought that perhaps this is where it would fit best.
Thanks for all your help!!!