蛙の井戸見聞記 Pretty frog in a well who knows nothing of the great web ocean!

~~ 好奇心は猫をも殺す Curiosity Kills the Cat ~~ ♪欲しいモノ・食べたいモノ・ネットで集めた情報と日々の記録の倉庫♪ Logging my life... Since 2003.12  

Xcode4 で古いプロジェクトを使う

Xcodeの旧バージョンで作成したCommand line プログラムをXcode4で稼働させると、MallocやAllocのエラーで、cinやgetlineを受け付けなくなる。
詳しいことは追求していないが、以下のようにすると回避できる。

  1. xcode4で新規にcommandlineプログラムのプロジェクトを作成する。
  2. 旧バージョンで作成したプログラムのファイルをすべてこのプロジェクトに登録する。
  3. コンパイル

I encountered the error message such as "Malloc error" during inputing from keyboard when I run my command-line-program compiled by Xcode 4. The program was generated by older version Xcode.

I tried to search solution by googling in the WEB, but none of them were useful. I recommend that to make new project of the command line program is helpful. After copying all the files into this new project, the program works well.

Good Luck!