这是代码:
#include <iostream>
#include <stdlib.h>

using namespace std;

typedef struct MyStruct{
int a;
};

void TestConstCase()
{
const MyStruct st = {100};
(const_cast<MyStruct *>(&st))->a--;
cout<<st.a<<endl;
}

int main(int argc, char *argv[])
{
TestConstCase();
system("PAUSE");
return 0;
}
























