However (not related to your question directly), your MemAddress function doesn't do anything, maybe you meant to write int MemAddress(int& MA1, int& MA2) instead? (note the &, which mean that the variables are references instead of copies).
Could you try casting those two values to int, to see if it stops crashing? (I'm not shure what cout does with a raw pointer.)
EDIT: Are you shure it is actually crashing, not just closing down the console straight after execution?
no it gave me a blue screen with a frowny face and it said something along the lines of "Windows has crashed, we are collecting crash information and your pc will restart in xx %"