ZFFramework
 
Loading...
Searching...
No Matches
Hello world

to start a quick hello world:

// include ZFCore.h for core function of ZFFramework
// you may need to setup your project's include path first
#include "ZFCore.h"
// declare app's main entry
// well, hello world to ZFFramework
ZFLog() << "hello world";
// use ZFLog or zfstr and `%s` to print "anything"
ZFLog("hello %s %s", "world", 2);
ZFLog(zfstr("hello %s %.2s", "world", 3.1));
}
header file for ZFCore module
#define ZFLog(...)
thread-safe log utility
Definition ZFLog.h:77
#define ZFMAIN_ENTRY()
app's main entry wrapper
Definition ZFMainEntry.h:38
zfstring zfstr(const zfchar *fmt=zft_zfnull)
string format util
Definition zfstr.h:59

ZFFramework would be started from ZFMAIN_ENTRY, you may write any C++ compatible code here
in this example, we just output "hello world" to ZFLog, which would output to a proper console by default