Hello everyone I am trying to learn C and I am relative new to the language but I did programming in Java before.
My Problem is I have the following structure
Code:
struct FluxCapacitor
{
unsigned char* c_string;
unsigned int value
};
And now I want to write a function like this
Code:
struct FluxCapacitor* createFluxCapacitor()
In the function I want to create a new instance of my struct and initialize my attributes with random values. Can someone explain to me how to do this in c?
Thanks for your help !