Namespaces
Variants
Actions
Revision as of 05:03, 29 June 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Getting the name of the current function in Symbian C++

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.


Article Metadata

Tested with
Devices(s): All (S60)

Compatibility
Platform(s): S60 3rd Edition

Article
Keywords: RDebug, __func__
Created: User:Technical writer 2 (June 25, 2007, updated December 17, 2008)
Last edited: hamishwillee (29 Jun 2012)


The name of the current function can be retrieved for logging purposes in debug builds with the __func__ predefined identifier:

  void LogFunctionName(const char* name)
{
RDebug::Printf("current function: %s\n", name);
}

Now the function name can be printed as follows:

  LogFunctionName(__func__);

See also

Simple-to-use Symbian C++ macros for writing debug log files

197 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved