Skip to content

Instantly share code, notes, and snippets.

@aldente39
Created December 24, 2012 07:09
Show Gist options
  • Save aldente39/4368169 to your computer and use it in GitHub Desktop.
Save aldente39/4368169 to your computer and use it in GitHub Desktop.
test
//MinGWのg++.exeでは、コンパイルは通るが実行した瞬間落ちる。
//Visual C++ 2010 Express に付いてきたcl.exeでは動く。
/*
g++ -vの出力
Using built-in specs.
COLLECT_GCC=D:\Applications\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=d:/applications/mingw/bin/../libexec/gcc/mingw32/4.7.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.7.0/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --wi
th-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --disable-build-poststage1-
with-cxx --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.7.0 (GCC)
*/
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
cout << "input: ";
cin >> str;
cout << "hoge\n" << str << "\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment