943,670 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 864
  • C++ RSS
Sep 23rd, 2009
0

What does the underscore mean in: _("Undo")

Expand Post »
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:
C++ Syntax (Toggle Plain Text)
  1. wxString label;
  2. if (name == wxT("Undo")) {
  3. label = _("Undo");
obviously, I snipped out a lot of code.

My question is, what does the underscore mean in:
C++ Syntax (Toggle Plain Text)
  1. _("Undo")
Similar Threads
Reputation Points: 18
Solved Threads: 2
Light Poster
edgar5 is offline Offline
30 posts
since Dec 2008
Sep 23rd, 2009
1

Re: What does the underscore mean in: _("Undo")

_ is usually associated with gettext with deals with text localization.
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Sep 23rd, 2009
0

Re: What does the underscore mean in: _("Undo")

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!
Last edited by edgar5; Sep 23rd, 2009 at 4:52 pm.
Reputation Points: 18
Solved Threads: 2
Light Poster
edgar5 is offline Offline
30 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: binary and hexadecimal display
Next Thread in C++ Forum Timeline: question on weather i should use a templat





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC