[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pitch to string conversion in c++
From: |
Marc Hohl |
Subject: |
pitch to string conversion in c++ |
Date: |
Fri, 16 Sep 2011 10:12:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 |
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
- pitch to string conversion in c++,
Marc Hohl <=