#include <iostream>
using namespace std;
int main() {
int a = 3;
cout<<"Address of a = "<<&a<<endl;
try{
throw a;
}catch(int& s){
cout<<"Address of s = "<<&s<<endl;
}
return 0;
}
Output:
Address of a = 0x7ffeee1c9b38
Address of s = 0x7fbdc0405900
Why are the addresses of a and s different??