Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

malloc, once again

Name: Anonymous 2010-11-03 8:25

I have a struct like
typedef struct { char* dildo; int etc } anus;.
Later on I want to make an anus array, with dildo being a string entered by the user.
Now how do I reserve the memory for dildo in my anus array?

So far I have:

typedef struct { char* dildo; int etc } anus;
...
char* small_dildo = fancy_input_routine();
anus* anii = (anus*) malloc(array_size * sizeof(anus));

With that I can't memcpy any small_dildo into my anii obviously, however I'm not quite sure how to do it.

Name: Anonymous 2010-11-03 19:17

>>14
For example, if I were to design a computer from scratch, I'd go with 18 bit bytes, mapping one character to one byte, and creating UTF-18 for it (fixed size, just a remap of UTF-32).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List