Hello,
I'm trying to convert a program from C to C++.
Code:
#define RANDSIZL (4) /* I recommend 8 for crypto, 4 for simulations */
#define RANDSIZ (1<<RANDSIZL)
/* context of random number generator */
struct randctx{
int randcnt;
int randrsl[RANDSIZ];
int randmem[RANDSIZ];
int randa;
int randb;
int randc;
};
typedef struct randctx randctx;
The typedef line doesn't make sense to me. A new name (randctx) for struct randctx? If I delete the typedef line it should still compile, but it doesn't. Any idea why? What's the point of having such a typedef line?