Hello list,

I tried to convert a pitch into a string like this:

Pitch *current_pitch = unsmob_pitch (event->get_property ("pitch"));
string pitchstring = current_pitch.to_string ();

and the compiler breaks with

error: request for member 'to_string' in 'current_pitch', which is of non-class type 'Pitch*'

But in lily/note-name-engraver.cc I have (simplified):

string s;
s = " ";
Pitch p = *unsmob_pitch (events_[i]->get_property ("pitch"));
s += p.to_string ();

and here it works obviously.

What's wrong with my code?

Thanks in advance!

Marc


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to