小编Clo*_*nes的帖子

错误,此处不允许在“{”标记之前定义函数

void main1()    
{

    const int MAX = 50;

    class infix
    {

    private:

            char target[MAX], stack[MAX];
            char *s, *t;
            int top, l;
        public:
            infix( );
            void setexpr ( char *str );
            void push ( char c );
            char pop( );
            void convert( );
            int priority ( char c );
            void show( );
    };
    void infix :: infix( ) //error
    {
        top = -1;
        strcpy ( target, "" );
        strcpy ( stack, "" );
        l = 0;
    }
    void infix :: setexpr …
Run Code Online (Sandbox Code Playgroud)

c++

8
推荐指数
2
解决办法
12万
查看次数

标签 统计

c++ ×1