Re: [gtkmm] convert double to char



>Anyone know how can I make this code work :
>
>[code]
>double DegreeLong=1.2011;
>   m_Entry2.set_text(DegreeLong);
>[/code]

this is an extremely basic C++ question. really way too basic and
general for this list.

	char buf[32];

	snprintf (buf, sizeof(buf), "%g", DegreeLong);
	m_Entry2.set_text (buf);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]