zoukankan      html  css  js  c++  java
  • nginx中C语言操作技巧学习

    #pragma once
    #ifndef CLANGTEST_H__
    #define CLANGTEST_H__
    
    #define ngx_debug_init()
    #define NGINX_VERSION      "1.17.7"
    #define NGINX_VER          "nginx/" NGINX_VERSION
    
    
    
    
    #endif // !CLANGTEST_H__
    ClangTest.h
    #include<iostream>
    #include"ClangTest.h"
    
    static int ngx_test();
    static int hello();
    
    typedef int(*intPtr)();
    
    intPtr num[] = { ngx_test };
    
    int(*funArray[])() = {ngx_test,ngx_test, hello, ngx_test, hello, ngx_test, hello ,hello ,hello ,hello ,hello ,ngx_test ,ngx_test ,ngx_test ,ngx_test };
    int main(int argc, char* argv[]) {
        using namespace std;
        ngx_debug_init();
        cout << "hello world " << std::endl;
        cout << NGINX_VER << endl;
        for (int i = 0; i < sizeof(funArray) / sizeof(int(*)()); i++) {
            cout << funArray[i]() << std::endl;
        }
        system("pause");
        return 0;
    }
    
    
    int ngx_test() {
        using std::cout;
        using std::endl;
        cout << "ngx_test" << endl;
        return 0;
    }
    
    static int hello() {
        using std::endl;
        using std::cout;
        cout << "Function test hello" << std::endl;
        return 5;
    }
  • 相关阅读:
    selenium修改cookie
    unittest同时支持参数化和生成html报告
    webdriver API
    selenium中CSS选择器定位
    VirtualBox中安装CentOS 7_Linux
    Selenium常见问题
    RFS常见问题
    RFS--RequestLibrary
    Fiddler抓取HTTPS请求配置
    Redis
  • 原文地址:https://www.cnblogs.com/zhangdewang/p/12605198.html
Copyright © 2011-2022 走看看