Quote:
Guitar ** guitarlists = (Guitar **)malloc(sizeof(Guitar *));
That should be
Guitar ** guitarlists = (Guitar **)malloc(row * sizeof(Guitar *));
[update]
As
Thaddeus Jones correctly pointed out, if you need a bidimensional array of
Guitar
then you have to modify
Quote:
guitarlists[i] = (Guitar *)malloc(sizeof(Guitar));
as well.
[/update]
Please note: since you apparently are using
C++
, why don't you use
C++
programming language and standard library features (e.g. containers)?