@vladimirgamalian/

CuteWellmadeVixen

C++11

No description

fork
loading
Files
  • main.cpp

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.26341209527280096","path":"main.cpp","file":{"path":"main.cpp","content":{"asEncoding":{"base64":"I2luY2x1ZGUgPGlvc3RyZWFtPgoKdm9pZCBmb28oaW50KiBwKSB7CiAgcCA9IG51bGxwdHI7CiAgc3RkOjpjb3V0IDw8ICJpbnNpZGU6ICIgPDwgcCA8PCBzdGQ6OmVuZGw7Cn0KCmludCBtYWluKCkgewogIGludCB2OwogIGludCogcCA9ICZ2OwogIHN0ZDo6Y291dCA8PCAiYmVmb3JlOiAiIDw8IHAgPDwgc3RkOjplbmRsOwogIGZvbyhwKTsKICBzdGQ6OmNvdXQgPDwgImFmdGVyOiAgIiA8PCBwIDw8IHN0ZDo6ZW5kbDsKfQo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

void foo(int* p) {
  p = nullptr;
  std::cout << "inside: " << p << std::endl;
}

int main() {
  int v;
  int* p = &v;
  std::cout << "before: " << p << std::endl;
  foo(p);
  std::cout << "after:  " << p << std::endl;
}