how can i declare something like this?

int main(int argc, char *argv[]){
    char *users[] = {};
    char *names[] = {};

    openPasswd(users, names);

    return 0;
}

void openPasswd(char &users[] = {}, char &names[] = {}){
}

as you see i want to populate the 2 char arrays from the function back to the main program.
thank you!!!

You mean like this?

void openPasswd(char* users[],char* names[], int maxitems)
{

}

int main(int argc, char* argv[])
{
    const int MaxItems = 20;
    char *users[MaxItems] = {0};
    char *names[MaxItems] = {0};

    openPasswd(users, names, MaxItems);
    return 0;
}

>> How can i declare it in C
Uh... How about in C?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.