{"action":"created","issue":{"url":"https://api.github.com/repos/pezy/CppPrimer/issues/96","repository_url":"https://api.github.com/repos/pezy/CppPrimer","labels_url":"https://api.github.com/repos/pezy/CppPrimer/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/pezy/CppPrimer/issues/96/comments","events_url":"https://api.github.com/repos/pezy/CppPrimer/issues/96/events","html_url":"https://github.com/pezy/CppPrimer/issues/96","id":195427129,"number":96,"title":"Exercise 2.21","user":{"login":"likui911","id":10994047,"avatar_url":"https://avatars.githubusercontent.com/u/10994047?v=3","gravatar_id":"","url":"https://api.github.com/users/likui911","html_url":"https://github.com/likui911","followers_url":"https://api.github.com/users/likui911/followers","following_url":"https://api.github.com/users/likui911/following{/other_user}","gists_url":"https://api.github.com/users/likui911/gists{/gist_id}","starred_url":"https://api.github.com/users/likui911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likui911/subscriptions","organizations_url":"https://api.github.com/users/likui911/orgs","repos_url":"https://api.github.com/users/likui911/repos","events_url":"https://api.github.com/users/likui911/events{/privacy}","received_events_url":"https://api.github.com/users/likui911/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-14T02:50:24Z","updated_at":"2016-12-14T03:27:38Z","closed_at":null,"body":"Exercise 2.21\r\n\r\nExplain each of the following definitions. Indicate whether any are illegal and, if so, why.\r\n\r\nint i = 0;\r\n(b) int *ip = i;\r\n这里（b）应该是合法的，i的值为0相当于空指针"},"comment":{"url":"https://api.github.com/repos/pezy/CppPrimer/issues/comments/266932851","html_url":"https://github.com/pezy/CppPrimer/issues/96#issuecomment-266932851","issue_url":"https://api.github.com/repos/pezy/CppPrimer/issues/96","id":266932851,"user":{"login":"pezy","id":1147451,"avatar_url":"https://avatars.githubusercontent.com/u/1147451?v=3","gravatar_id":"","url":"https://api.github.com/users/pezy","html_url":"https://github.com/pezy","followers_url":"https://api.github.com/users/pezy/followers","following_url":"https://api.github.com/users/pezy/following{/other_user}","gists_url":"https://api.github.com/users/pezy/gists{/gist_id}","starred_url":"https://api.github.com/users/pezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pezy/subscriptions","organizations_url":"https://api.github.com/users/pezy/orgs","repos_url":"https://api.github.com/users/pezy/repos","events_url":"https://api.github.com/users/pezy/events{/privacy}","received_events_url":"https://api.github.com/users/pezy/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T03:27:38Z","updated_at":"2016-12-14T03:27:38Z","body":"> i的值为0相当于空指针\r\n\r\nnullptr 有类型吗? i 是 int 型的, 这能 \"相当于\"? 不可想当然.\r\n\r\n```\r\nmain.cpp:6:10: error: cannot initialize a variable of type 'int *' with an lvalue of type 'int'\r\n    int *ip = i;\r\n         ^    ~\r\n```\r\n\r\ncheck: http://coliru.stacked-crooked.com/a/0860103336850c2a"}}
{"actor":{"display_login":"pezy"}}