美文网首页
2020-06-27

2020-06-27

作者: 断弯刀 | 来源:发表于2020-06-27 11:35 被阅读0次
    #include <iostream>
    using namespace std;
    
    
    class CExample
    {
    private:
        int a;
    
    public:
        //构造函数
        CExample(int b)
        {
            a = b;
            cout << "creat: " << a << endl;
        }
    
        //拷贝构造
        CExample(const CExample& C)
        {
            a = C.a;
            cout << "copy" << endl;
        }
    
        //析构函数
        ~CExample()
        {
            cout << "delete: " << a << endl;
        }
    
        void Show()
        {
            cout << a << endl;
        }
    };
    
    //全局函数,传入的是对象
    void g_Fun(CExample C)
    {
        cout << "test" << endl;
    }
    
    int main()
    {
        CExample test(1);
        //传入对象
        g_Fun(test);
    
        return 0;
    }
    
    echo '<script type="text/javascript">';
    $php_test = 'I come from PHP!';
    echo "var test='$php_test';";
    echo "var test='$php_test';";
    echo 'alert(test);';
    echo '</script>';
    
    replace into t(id, update_time) select 1, now();
    

    相关文章

      网友评论

          本文标题:2020-06-27

          本文链接:https://www.haomeiwen.com/subject/fqmmfktx.html