Hi Following is the code
I am getting an error when calling the create function.when assigning value to k as "XX" , and not while assigning value to count. please helpCode:struct a{ string k; int count; } a *create() { a *b; b=(a *)malloc(sizeof(a)); b->count=0; b->k="XX"; return b; } int main(int argc, char ** argv) { a* test; test=create(); return 0; }



LinkBack URL
About LinkBacks



