R
raphfrk
Is there a way to define a typedef to be an array of fixed length?
Is there a way to define a typedef to be an array of fixed length?
Is there a way to define a typedef to be an array of fixed length?
Did you consider
typedef int array_of_10_ints[ 10 ];
int main( ) {
array_of_10_ints x;
size_t i;
for ( i = 0; i < sizeof x / sizeof *x; i++ )
x[ i ] = i;
...
The real challenge would be to typedef an array of variable
length, I guess;-)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.