Skip to content

Instantly share code, notes, and snippets.

@skysign
Created May 7, 2020 12:05
Show Gist options
  • Save skysign/2f2beed75affed9bc0e4eee0b19e928f to your computer and use it in GitHub Desktop.
Save skysign/2f2beed75affed9bc0e4eee0b19e928f to your computer and use it in GitHub Desktop.
cpp question
#include <iostream>
int global[3][3];
void func1(int** local);
int main()
{
func1((int**)global);
std::cout << "Hello World!\n";
return 1;
}
void func1(int** local) {
local[0][0] = 1; // <- exception
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment