• 締切済み

VS2005 C++ランタイムエラー

環境 OS:windowsXP Pro SP3 開発環境:Visual Studio 2005 Academic Edition 開発言語:C++ 上記の環境で開発を行っているのですが、プログラムをデバックした時、添付画像のエラー(おそらくランタイムエラー)が発生し、VSが強制終了してしまいます。 解決方法を教えて頂きたく、宜しくお願い致します。 プロジェクト作成方法 Win32 コンソールアプリケーション→空のプロジェクトにチェック→ソースファイルにC++ファイル(cpp)を作成 実行ソース #include <iostream> using namespace std; int main() { cout << "hello" << endl; } 今まで試したこと Visual Studioの再インストール(一応Windows Install Clean Upを使用しました) 以下サイトより、Microsoft Visual C++ 2005 再頒布可能パッケージ (x86)のインストール http://jp.layer8.sh/reference/entry/show/id/2391 以上です。

みんなの回答

  • goold-man
  • ベストアンサー率37% (8365/22183)
回答No.1

エラーのプログラム名は? エラーのProgram Files¥***がわかりませんが、プログラム名によって参考URLの事例のような解決法があることもあります。(1) (2)修正プログラムがある場合 http://support.microsoft.com/kb/884538/ja (3)海外のサイト 一例 system32\****\***.exe http://forums.iis.net/t/1148965.aspx (4)海外のサイト 一例 http://www.mathworks.com/support/solutions/en/data/1-18QZZ/index.html?product=ML&solution=1-18QZZ

参考URL:
http://kb2.adobe.com/jp/cps/234/234253.html
mikanbako00
質問者

お礼

早速の回答ありがとうございます。 参考URL確認させて頂きます。 また、プログラム名なんですが、添付画像の通りC:\Pro...としか表示されず確認することができません。 確認方法などがあれば教えて頂きたく。

関連するQ&A

  • C++のiostreamのインクルードが不可能です

    C++のiostreamのインクルードが不可能です。 とても初歩的な話でお恥ずかしいのですが、 Visual Studio 2012 Express for Windows DesktopにてC++の入門をしようとしている者です。 入門書の通り、iostreamをインクルードしてnamespaceをstdにして int main() { cout << "Hello, World!" << endl; return 0; } このようなHello,World!コードを作ったのですが、エラーが発生し、 ・ソースファイルを開けません "iostream" ・識別子 "cout", "endl" が定義されていません と表示され、デバッグエラーとなります。 プロジェクトの作り手順としては C++の空のプロジェクトからcppファイルをソースファイルに追加する手順です。 どなたか解決方法をご教授ください。

  • 本当に第一歩から躓いていますがVisual C++2008で

    本当に第一歩から躓いていますがVisual C++2008で の設定の仕方どうプログラムを書くまでの手順を細かく教えて下さると嬉しいです 仕様が変わっているのかサイトに書いてある手順でやってもエラーになり、どうしていいか わかりません プロジェクト新規で作る (win32コンソールアプリケーション、コンソール、空のオブジェクト) ファイル作る (c++のソースで) これ貼り付けてF5実行 エラーでる・・ #include <iostream.h> int main() { cout << "やぁ、こんちは。" << endl; return 0; }

  • C++ の while ループ

    C++の基本学習者です。Windows 10 で Visual Studio Community 2015 を使っています。 教本に載っている、機械語のプログラムをC++でシミュレーションする、というものを作ろうと、途中まで下のようなコードを書き込み、そこまで間違いがないかを確かめるために、コンパイルして実行したら、添付の写真のようなエラーメッセージが出てきました。 // ConsoleApplication65.cpp : メイン プロジェクト ファイルです。 #include "stdafx.h" #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> #include <cmath> #include <cstring> using namespace System; using namespace std; int main() { // variables int program = 0; int accumulator = 0; int count = 0; int instructionRegister = 0; int operationCode = 0; int operand = 0; int location[100]; cout << "*** Welcome to Simpletron ***" << endl; cout << "*** Please enter your program ***" << endl; cout << "*** one instruction at a time,***" << endl; cout << "*** after the location number and and the prompt of '?' ***" << endl; cout << "*** To stop entering instructions, ***" << endl; cout << "*** enter -9999 . ***" << endl << endl; cout << setfill('0') << internal; cout << setw(3) << count << " ? "; cin >> program; while (program != -9999) { location[count] = program; count++; } return 0; } while ループに問題がありそうですが、コンパイルはちゃんとできたのに、何が悪いのでしょうか? 詳しい方、どうぞ教えてください。お願いします。

  • C++について。

    現在”猫でもわかるプログラミング”のC++編をSDKと共に勉強している身です。 現在第22章、第23章を勉強中です。 22章 http://www.kumei.ne.jp/c_lang/cpp/cpp_22.htm 23章 http://www.kumei.ne.jp/c_lang/cpp/cpp_23.htm 作業環境はVisual Studio 2005.net C++です 22章でのプログラムを作成し、実行した結果エラーが出てしまいました。 ソースです #include <iostream> class xy_position { int x; int y; public: xy_position(int x = 0, int y = 0){ xy_position::x = x; xy_position::y = y; } int X() const {return x;} int Y() const {return y;} }; ostream& operator << (ostream& o, const xy_position& p) { return o << "(" << p.X() << "," << p.Y() << ")"; } int main(void) { xy_position a(50, 60), b; std::cout << a << b << std::endl; return 0; } (17):error C2143: 構文エラー : ';' が '&' の前にありません。 (17):error C4430: 型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません (17):error C2065: 'o' : 定義されていない識別子です。 (17):error C2059: 構文エラー : 'const' (18):error C2143: 構文エラー : ';' が '{' の前にありません。 (18):error C2447: '{' : 対応する関数ヘッダーがありません (旧形式の仮引数リスト?) (26):error C2679: 二項演算子 '<<' : 型 'xy_position' の右オペランドを扱う演算子が見つかりません (または変換できません)。 このようなエラーが出てしまいました。 もちろんソースは全て同様に書いています。 この”猫でも”で使用しているコンパイラと異なるために出たエラーでしょうか? それに単に cout << のように記述するとエラーが出てしまい、 std::cout << のように記述しなければ通りません。 また、エラーとは別の質問になってしまいますが、プログラム中に int X() const {return x;} という記述がありますが、このconstの意味が分かりません。 単純に return x が変更不可能という意味でしょうか? 次に23章についての質問です。 ここでもソースは同じなのに以下のようなエラーが出てしまいます。 ソースです。 #include <iostream> int main(void) { int x=10, y=15, z=20; std::cout << "16進表示" << std::endl; std::cout.setf(ios::hex); std::cout << x << std::endl; std::cout << y << std::endl; std::cout << z << std::endl; std::cout.unsetf(iostream::hex); std::cout << "8進数" << std::endl; std::cout.setf(ios::oct); std::cout << x << std::endl; std::cout << y << std::endl; std::cout << z << std::endl; return 0; } (8):error C2653: 'ios' : 識別子がクラス名でも名前空間名でもありません。 (8):error C2065: 'hex' : 定義されていない識別子です。 (13):error C2653: 'iostream' : 識別子がクラス名でも名前空間名でもありません。 (15):error C2653: 'ios' : 識別子がクラス名でも名前空間名でもありません。 (15):error C2065: 'oct' : 定義されていない識別子です。 これも何か設定をしなければいけないのでしょうか? なにぶんC++は・・・というかオブジェクト指向の言語は初心者なもので疑問も多いですorz

  • プログラミング言語Cとプログラミング言語C++

    プログラミング言語Cとプログラミング言語C++の違いって何ですか? あと、プログラミング言語C++についていくつか質問があります。 #include <iostream> using namespace std; void main(){ cout << "Hello world!" << endl; } このプログラムについて質問なんですが、iostreamってプログラミング言語Cで言うstdio.hのことですか? using namespace stdって何ですか? あと、 cout <<"Hello world!"って何ですか?

  • プログラミング言語C++のエラー

    #include <iostream> #include <string> using namespace std; template <typename T> T max(T n1, T n2) { if(n1 > n2) { return n1; } return n2; } int main(){ cout << max<int>(1,2) << endl; cout << max<double>(1.75,3.12) << endl; string s1 = "aiu",s2 = "eo"; cout << max<string>(s1,s2) << endl; return 0; } このコードを入力すると、添付写真のようなエラーが出ます。使用しているのはmacOSのVisual Studio codeです。明らかにいじってはいけない場所のファイル /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__algorithm/max.h (添付写真のエラー表示下部のパス)が勝手に参照され、引数が一致してしまっているオーバーロードした関数となってしまいます。maxをMaxなどとすると問題は解決するのですが、既存のコードを編集する際、いちいちmaxでエラーが出ると不便です。 ちなみにテンプレートではなく、引数ごとに関数を作ればエラーは出ません。 解決方法を知っている方が居れば教えてほしいです。

  • templateのエラー

    すいません、C++始めたばっかりなのですが、 以下のようなエラーが出て困っています。 ClusteringMain.obj : error LNK2001: 外部シンボル ""public: void __thiscall File2Array<double>::disp(void)" (?disp@?$File2Array@N@@$$FQAEXXZ)" は未解決です。 どなたかご教授ください。 環境はWindows XP, Visual Studio.NET 以下はソースです。 --------ClusteringMain.cpp------------ #include < iostream > #include"File2Array.h" using namespace std; int main() { cout << "Hello world" << endl; File2Array<double> test; test.disp(); return 0; } ---------File2Array.cpp----------------- #include"File2Array.h" template <class Type> void File2Array<Type>::disp(void) { cout << "aaaaa" << endl; } ---------File2Array.h------------------- #include<iostream> #include<fstream> using namespace std; #ifndef FILE2ARRAY_H #define FILE2ARRAY_H 1 template <class Type> class File2Array { private: Type var; public: void disp(void); }; #endif // #define FILE2ARRAY_H 1

  • iostream インクルード時に発生するエラー

    C++ の勉強をするためにVisualStudio2008にて下記コードをビルドしたのですが、エラーが発生してビルドが失敗しました。 ■ コード #include <iostream> using namespace std; int main() { std::cout << "Hello World !"; return 0; } ■ 操作 空のコンソールアプリケーションを作成し、ソースファイルに追加>新しい項目 にて "temp.cpp" を追加、コードを入力。その後 ビルド > ソリューションのビルド を実行。 ■ エラー(一部) >> 「説明」 列 warning C4985: 'strlen': 前の宣言に属性が存在しません。 error C2039: 'wmemcpy_s' : '`global namespace'' のメンバではありません。 error C3861: 'wmemcpy_s': 識別子が見つかりませんでした error C2039: 'wmemmove_s' : '`global namespace'' のメンバではありません。 error C3861: 'wmemmove_s': 識別子が見つかりませんでした error C2039: 'memcpy_s' : '`global namespace'' のメンバではありません。 error C3861: 'memcpy_s': 識別子が見つかりませんでした error C2039: 'memmove_s' : '`global namespace'' のメンバではありません。 >>対応する「ファイル」列 d:\program files\microsoft visual studio 9.0\vc\include\exception d:\program files\microsoft visual studio 9.0\vc\include\iosfwd d:\program files\microsoft visual studio 9.0\vc\include\iosfwd d:\program files\microsoft visual studio 9.0\vc\include\iosfwd d:\program files\microsoft visual studio 9.0\vc\include\iosfwd d:\program files\microsoft visual studio 9.0\vc\include\iosfwd d:\program files\microsoft visual studio 9.0\vc\include\iosfwd d:\program files\microsoft visual studio 9.0\vc\include\iosfwd プロジェクトのプロパティやインストール時の構成などで何か問題があるのでしょうか。VisualStudio以外にはWindows SDK 、Windows SDK 6.0A、SQL Server2005などが導入されています。 再インストールするのもありかと思ったのですが、原因が分からないとまた同じ現象が発生しそうなため踏み切れません。 よろしくお願いします。

  • cwchar内でエラーが起きます。

    C++を勉強しているのですが、コンパイルをすると、 識別子が必要です cwchar C2059 構文エラー: '::' cwchar C2589 'unsigned': スコープ解決演算子 (::) の右側にあるトークンは使えません。 cwchar と、cwchar.h内でエラーが起きてしまいます。コードを絞っていって、最終的に以下のコードでもエラーが起きていました。 #include <iostream> using namespace std; int main(){     cout << "HelloWorld." << endl;     return 0; } なぜでしょうか?改善方法を教えていただけると嬉しいです。 環境はVisualStudioCommunity2015 windows10 です。

  • Visual C++ 2010 について

    Microsoft Visual C++ 2010 再頒布可能パッケージ の 「64bit版」と「32bit版」の違いを教えて欲しいです。 この「64bit」「32bit」というのはインストールしてあるPCのことではなく、開発環境の事ですよね。 私の理解では、開発環境が「Microsoft Visual C++ 2010 64bit」の場合、 「Microsoft Visual C++ 2010 再頒布可能パッケージ (x64) が必要で、 開発環境が「Microsoft Visual C++ 2010 32bit」の場合 「Microsoft Visual C++ 2010 再頒布可能パッケージ (x86) が必要 という理解ですが、違ってますか?

専門家に質問してみよう