# include <stdio.h>
# include "Cenum3.h"
UserEnum From ;
char* Text ;
} Message ;
int result = 0 ;
if ( argc > 1 )
Message m ;
m.From = Bob ;
m.Text = argv [ 1 ] ;
printf ( "%d says \"%s\"\n" , m.From , m.Text ) ;
/* This line would cause an error */
// printf ( "%s says \"%s\"\n" , m.From , m.Text ) ;
/* We use the numeric value as an index into the array of strings */
printf ( "%s says \"%s\"\n" , UserNames [ m.From ] , m.Text ) ;
return ( result ) ;
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.