C ++ * vs [] jako parametr funkcji
Jaka jest różnica pomiędzy:
void foo(item* list)
{
cout << list[xxx].string;
}
i
void this(item list[])
{
cout << list[xxx].string;
}
Zakładając, że przedmiot jest:
struct item
{
char* string;
}
Wskaźnik wskazuje pierwszy z szeregu znaków
ilist
to tylko szereg przedmiotów ...