new_item ??!!


 
Thread Tools Search this Thread
Top Forums Programming new_item ??!!
# 1  
Old 11-16-2006
PHP new_item ??!!

I have the folowing structure..

struct usr
{
char user[256];
}

struct usr live[50]; /* array of structure */
live[1].user="something";
live[2].user="anithing";
...
live[9].user="end";

I am using menu library from ncurses :

and I want to items for the panel :
Code:
ITEM **my_items;

        my_items = (ITEM **)calloc(9, sizeof(ITEM *));
        for(i = 0; i < 9; ++i)
        my_items[i] = new_item( live[i].user , "USER" );


I have a real problem with live[i].user , I encountur a lot of errors .. what is wrong ??? Smilie
# 2  
Old 11-16-2006
strcpy(live[i].user],"some string");

NOT:
live[i].user="some string"
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question