Okay, it's been a long time since I've programmed in C++! Languages change considerably in the last 5 years or so. In reviewing some source code I often see statements like this:

wxString label;
      if (name == wxT("Undo")) {
         label = _("Undo");

obviously, I snipped out a lot of code.

My question is, what does the underscore mean in:

_("Undo")

Recommended Answers

All 2 Replies

_ is usually associated with gettext with deals with text localization.

commented: That makes some sense to me. +1

OK, that might be enough for me to actually figure out what it is being used for here. I thought it might be some new C++ convention.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.