天天看点

Google开源html模板库ctemplate的完整使用示例

ctemplate是Google开源的一个C++版本html模板替换库。有了它,在C++代码中操作html模板是一件非常简单和高效的事。通过本文,即可掌握对它的简单使用。

示例html模板文件example.htm内容如下:

ctemplate示例模板

    {{table1_name}}

            {{#TABLE1}}

                    {{field1}}

            {{field2}}

            {{field3}}

        {{/TABLE1}}

继续阅读