问题标题: 新的卡编译器方法

0
0
已解决
薛乘志
薛乘志
初级启示者
初级启示者

将这段代码加到main函数前:

template <class T> class KK { KK<T *> operator->(); };
#define Kill() KK<int> kk; kk->kill();

然后执行Kill()即可卡**编译器

 

错误信息(部分):

./eftgr.cpp: In function 'int main()':
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp: In instantiation of 'KK<T*> KK<T>::operator->() [with T = int]':
./eftgr.cpp:6:2:   required from here
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int**]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int***]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int****]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*****]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int******]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*******]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int********]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*********]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int**********]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int***********]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int**************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int***************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int****************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*****************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int******************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~
./eftgr.cpp:3:39: note: declared private here
    3 | template <class T> class KK { KK<T *> operator->(); };
      |                                       ^~~~~~~~
./eftgr.cpp:4:30: error: 'KK<T*> KK<T>::operator->() [with T = int*******************]' is private within this context
    4 | #define Kill() KK<int> kk; kk->;
      |                              ^~
./eftgr.cpp:6:9: note: in expansion of macro 'Kill'
    6 |         Kill();
      |         ^~~~

......

看出来是把编译器整了个无限递归


0
已采纳
姜宇轩
姜宇轩
中级天翼
中级天翼

呃,我需要它干甚?

我要回答