📄 hellotext.cpp
字号:
// hellotext.cpp
#include <e32base.h>
#include <e32cons.h>
LOCAL_D CConsoleBase* gConsole;
// Real main function
void MainL()
{
gConsole->Printf(_L("Hello world!\n"));
}
// Console harness
void ConsoleMainL()
{
// Get a console
gConsole = Console::NewL(_L("Hello Text"),
TSize(KConsFullScreen, KConsFullScreen));
CleanupStack::PushL(gConsole);
// Call function
MainL();
// Pause before terminating
User::After(5000000); // 5 second delay
// Finished with console
CleanupStack::PopAndDestroy(gConsole);
}
// Cleanup stack harness
GLDEF_C TInt E32Main()
{
__UHEAP_MARK;
CTrapCleanup* cleanupStack = CTrapCleanup::New();
TRAPD(error, ConsoleMainL());
__ASSERT_ALWAYS(!error, User::Panic(_L("SCMP"), error));
delete cleanupStack;
__UHEAP_MARKEND;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -