这是我编写的代码:
#include <iostream>
using namespace std;
struct working{
int*pointer;
int inf;
};
int main()
{
working one;
working *two;
working **three;
one.inf=5;
one.pointer=NULL;
two=&one;
cout<<two<<endl;
cout<<two->pointer<<endl;
cout<<two->inf<<endl;
three=&two;
cout<<three<<endl;
cout<<three->pointer<<endl;
return 0;
}
如何像我对inf
所做的操作一样,从pointer
获得three
或two
元素?
而且,如果可以的话,您能告诉我*three=two
做什么。如果我用three=&two
切换它,为什么不编译呢?
答案 0 :(得分:1)
public class HttpHandshakeInterceptor implements HandshakeInterceptor {
@Autowired
private IArticleService articleService; // is null
@Autowired
private UserDAO userDAO; // is null
public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception ex) {
}