次のコードをコンパイルしました。
#include <iostream> 
int main(int argc, char* argv[]) {
    int a = 2; 
    int $b = a; 
    b = 3; 
    std::cout << a << std::endl;
    return 0; 
} 
Visual Studio 2012でコンパイルすると、期待どおりに3が出力されます。ただし、g ++ 3.4.4でコンパイルすると、次のエラーが発生します。
error: `b' undeclared (first use this function)
なぜ以下はVisualStudio2012でコンパイルされますが、g ++ではコンパイルされないのですか?