• ベストアンサー
※ ChatGPTを利用し、要約された質問です(原文:remove_copy_ifがVisualStudio2005でwarning!?)

remove_copy_ifがVisualStudio2005でwarning!?

このQ&Aのポイント
  • C/C++で使用するremove_copy_if関数で警告が出る場合の対処方法について教えてください
  • remove_copy_if関数について、新たに見つかったAPIである_Remove_copy_ifについても解説してください
  • VisualStudio2005でのremove_copy_if関数の引数の意味について詳しく教えてください

質問者が選んだベストアンサー

  • ベストアンサー
  • LegaC2
  • ベストアンサー率52% (224/428)
回答No.1

> 警告を消すにはどうしたら良いでしょうか? ワーニング文章中にも書いてありますが、コンパイルオプションに「-D_SCL_SECURE_NO_WARNINGS」を追加すれば、このワーニングを消すことが出来ます。

goopon
質問者

お礼

ありがとうございます。 このコンパイルオプションを追加しても問題ないのでしょうか??

全文を見る
すると、全ての回答が全文表示されます。

関連するQ&A

  • Visual C++ 2008 Expreesのコンパイルについて

    夜も遅くに申し訳ありません 現在、Visual C++ ExpressでCのソースを書いているのですが 以下のような警告がでてしまいます 1>------ ビルド開始: プロジェクト: addres2, 構成: Release Win32 ------ 1>コンパイルしています... 1>strling.c 1>.\strling.c(19) : warning C4090: 'return' : 異なる 'const' 修飾子です。 1>.\strling.c(67) : warning C4090: 'return' : 異なる 'const' 修飾子です。 1>save.c 1>.\save.c(8) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : 'fopen' の宣言を確認してください。 1>namesort.c 1>nameret.c 1>.\nameret.c(20) : warning C4996: 'gets': This function or variable may be unsafe. Consider using gets_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(279) : 'gets' の宣言を確認してください。 1>main.c 1>.\main.c(30) : warning C4996: 'gets': This function or variable may be unsafe. Consider using gets_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(279) : 'gets' の宣言を確認してください。 1>load.c 1>.\load.c(15) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : 'fopen' の宣言を確認してください。 1>key.c 1>input.c 1>.\input.c(13) : warning C4996: 'gets': This function or variable may be unsafe. Consider using gets_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(279) : 'gets' の宣言を確認してください。 1>.\input.c(28) : warning C4996: 'gets': This function or variable may be unsafe. Consider using gets_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(279) : 'gets' の宣言を確認してください。 1>.\input.c(31) : warning C4047: '関数' : 間接参照のレベルが 'char *' と 'char (*)[64]' で異なっています。 1>.\input.c(31) : warning C4024: 'InputKey' : の型が 1 の仮引数および実引数と異なります。 1>リンクしています... 1>コード生成しています。 1>コード生成が終了しました。 1>マニフェストを埋め込んでいます... 1>ビルドログは "file://g:\プログラム\addres2\addres2\Release\BuildLog.htm" に保存されました。 1>addres2 - エラー 0、警告 10 ========== ビルド: 1 正常終了、0 失敗、0 更新不要、0 スキップ ========== 一応は正常終了するのですが実行ファイル(exe)が生成されません 原因を探そうとネットを漁ってみたのですが判らないままです。 警告を全て消さないといけないのでしょうか? 申し訳ありませんが教えてください

  • backward_warning.hによる警告

    こんにちは。 独自で作成した、C:\Emacs_for_Windows\My_C++_Header_for_Bash.hというファイルパスを持つヘッダファイルをインクルードしているC++のソースファイルのtest.cppを、Cygwinのbash上で、g++コマンドを使い、 g++ test.cpp のようにビルドしたところ、以下のような警告が出ました。 ------------------------------------------------------------ bin/../lib/gcc/i686-pc-cygwin/4.3.4/include/c++/backward/strstream:51 から include されたファイル中, C:\Emacs_for_Windows\My_C++_Header_for_Bash.h:35 から, test.cpp:2 から: /bin/../lib/gcc/i686-pc-cygwin/4.3.4/include/c++/backward/backward_warning.h:33:2: 警告: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. ------------------------------------------------------------ Borland C++ Compiler 5.5 のbcc32コマンドでは、こういった警告は出ません。 /bin/../lib/gcc/i686-pc-cygwin/4.3.4/include/c++/backward/backward_warning.h:33 を参考に、backward_warning.hの33行目以降をみると、以下のようになっていました。 ------------------------------------------------------------ #ifdef __DEPRECATED 33 #warning \ 34 This file includes at least one deprecated or antiquated header which \ 35 may be removed without further notice at a future date. Please use a \ 36 non-deprecated interface with equivalent functionality instead. For a \ 37 listing of replacement headers and interfaces, consult the file \ 38 backward_warning.h. To disable this warning use -Wno-deprecated. ------------------------------------------------------------ どうやら「__DEPRECATED」が定義されているので、こういった警告が出ているようなのですが、 __DEPRECATEDの意味が分かりません。 警告の指示通り、-Wno-deprecatedを付けたままC++開発を続けて問題ないのでしょうか? ちなみに、C:\Emacs_for_Windows\My_C++_Header_for_Bash.hの内容は以下の通りです。 ------------------------------------------------------------ #ifndef MYHEADER_H #define MYHEADER_H //C言語のヘッダファイル #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <time.h> #include <math.h> #include <stddef.h> //C++言語のヘッダの標準識別子 #include <iostream> #include <fstream> #include <cctype> #include <cstring> #include <cstdlib> #include <ctime> #include <cstdio> #include <new> #include <iomanip> #include <strstream> #include <typeinfo> //STLに関するヘッダ #include <string> #include <vector> #include <deque> #include <list> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <numeric> #include <cassert> #include <iterator> //namespaceの解決 using namespace std; #endif ------------------------------------------------------------ 以上の件について何かご存知の方がいらっしゃれば、是非教えて頂きたいと思います。 では、よろしくお願い致します。

  • C++でコンパイルするとwarningが出ます

    C++初心者です。 C++でコンパイルすると以下のようなwarningメッセージが出るのですが、どういう意味なんでしょうか?解決策があれば教えてください。 プログラム(sample.cpp) #include <iostream.h> main(){ cout << " sample \n"; } warningメッセージ In file included from /usr/include/c++/3.3.1/backward/iostream.h:31, from sample.cpp:1: /usr/include/c++/3.3.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider usin g one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <s stream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated

  • Xampp でWarning

    Mac OSX10.6 でXampp を使い始めました 下記の様なWarningがでます Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. php.iniの date.timezone="Asia/Tokyo" にしたら 直ったとネットでは書いていましたが やってみても直りません 何か対策はありますか? よろしくお願いいたします。

    • ベストアンサー
    • PHP
  • [Warning]が出るのですが、何故かわかりません。

    [Warning]が出るのですが、何故かわかりません。 <html> <body> <?php if($db = sqlite_open('db_ehon')){ $query = "INSERT INTO tbl_ehon (id, title, price) VALUES (1, 'a', 1380)"; $result = sqlite_query($db, $query); $query = "INSERT INTO tbl_ehon (id, title, price) VALUES (2, 'b', 1580)"; $result = sqlite_query($db, $query); $query = "INSERT INTO tbl_ehon (id, title, price) VALUES (3, 'c', 1680)"; $result = sqlite_query($db, $query); $query = "INSERT INTO tbl_ehon (id, title, price) VALUES (4, 'd', 1680)"; $result = sqlite_query($db, $query); print "「db_ehon」を作成しました。"; }else{ die("データを登録できません。"); } sqlite_close($db); ?> </body> </html> ■表示______________ Warning: sqlite_query() [function.sqlite-query]: no such table: tbl_ehon in C:\Apache Group\Apache2\htdocs\test2.php on line 13 Warning: sqlite_query() [function.sqlite-query]: no such table: tbl_ehon in C:\Apache Group\Apache2\htdocs\test2.php on line 16 Warning: sqlite_query() [function.sqlite-query]: no such table: tbl_ehon in C:\Apache Group\Apache2\htdocs\test2.php on line 19 Warning: sqlite_query() [function.sqlite-query]: no such table: tbl_ehon in C:\Apache Group\Apache2\htdocs\test2.php on line 22 「db_ehon」を作成しました。 ”db_ehon”は同じディレクトリに作成されます。 初歩的な事のような気がしますが、分るかたお願い致します。

    • ベストアンサー
    • PHP
  • pg_copy_fromの使い方について質問です。

    pg_copy_fromの使い方について質問です。 <?php $a = array(1,2); $con=pg_connect("host=localhost dbname=byoin port=5432 user=postgres"); if (!$con) { die("データベースが開けません。<br>\n"); } pg_copy_from($con,ccc,$a,","); pg_close($con); ?> のようにすると、 Warning: pg_copy_from() [function.pg-copy-from]: Copy command failed: ERROR: 列"eee"のデータがありません CONTEXT: cccのCOPY。行番号 1: "1" in C:\xampp\htdocs\c.php on line 7 のようにエラーが出ます。 ちなみにデータベースは、 cccというテーブルの中にddd(integer not null、主キー)とeee(integer)の2列が作ってあります。 どうすれば、コピーがうまく出来るのでしょうか? ご回答をお願い致します。

    • ベストアンサー
    • PHP
  • C++, strcpy の warning.

    VC2005 Express Edition を使ってます。 #include <iostream> #include <string> using namespace std; int main() {   char str[10] = "hello";   strcpy(str, "HELLO"); } ↑ こちらをコンパイルすると hello.cpp .\hello.cpp(8) : warning C4996: 'strcpy' was declared deprecated C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(73) : see declaration of 'strcpy' という警告が出るのはどうしてでしょうか? #include <string.h> も試したのですが同じ警告でした。

  • Warningの意味・・・

    またなんですが、困っています・・・m(__)m Warning: fopen(./data/6-9.xml): failed to open stream: No such file or directory in /***/***/xmldoc.php on line 83 xml file[./data/6-9.xml] don't open... 上記のような表示になりました。 <xmldoc.php> /* XMLファイルを開く */ if(!($fp = fopen($this->xml_filename, "r"))) ←83 { die("xml file[" . $this->xml_filename . "] don't open..."); } $tmp = ""; $encord; 意味がよく分からなくて困っています。。 お力貸していただければと思います(><)

    • ベストアンサー
    • PHP
  • itの用法について。

    ●If you use a stapler on that document, it may not copy correctly. その書類を綴じるのにホチキスを使うと、ちゃんとコピーできないかもしれない。 ・このitの用法を教えてください。

  • C++配列の型に関するC++規格について教えていただきたいです。

    C++配列の型に関するC++規格について教えていただきたいです。 以前にYahoo知恵袋でも質問しましたが、答えが得られませんでしたので、こちらでも質問させていただきたいと思います。 ※以下、質問になります。(分かり難いかも知れませんが宜しくお願い致します。) 環境は、Visual Studio 2010 (C++) です。 std::fill_n() で次のような警告がでましたので、調べていましたところ、 ...\xutility(2801): warning C4996: 'std::_Fill_n': Function call with parameters that may be unsafe - ... 次のような定義方法を見つけました、 typedef char (&std::tr1::_No)[1]; ↑このような定義方法があることを初めて知りました。 ちなみに、std::fill_n() は次のようになりました。 long data[32]; std::fill_n(data, 32, 0); ←正常 long* p_data = data; std::fill_n(p_data, 32, 0); ←warning long (&a_data)[32] = data; std::fill_n(a_data, 32, 0); ←正常 知りたいのは、配列を関数に渡すときに、 通常は、void func(long* pd); のようにポインタで渡すと思います。 また、void func(long pd[]); や void func(long pd[32]); もポインタの場合と同じになりますが、型保証がありません。 これはC++規格で規定されていることだと思います。 次のようにすると、型保証がされますが、この記法がC++の規格として規定されているかを知りたいです。 1. void func(long (&ad)[32]); // 関数呼び出しは、func(data); 2. void func(long (*pd)[32]); // 関数呼び出しは、func(&data); また、通常のポインタで配列を渡すことを、配列の参照渡し?と言うと思いますが、 この1,2,は何渡し?と言われるのでしょうか? #長い文になって申し訳ありませんが、宜しくお願い致します。

bitdifenderの製造元はどこ?
このQ&Aのポイント
  • bitdifenderはどこ製でしょうか。カスペルスキーがロシアの企業製だとされている中、bitdifenderはどこの企業が製造しているのでしょうか。
  • bitdifenderはどこの企業が製造しているのか気になります。カスペルスキーがロシアの企業製と言われていますが、bitdifenderはどこ製なのでしょうか。
  • bitdifenderの製造元はどこなのか知りたいです。カスペルスキーはロシアの企業製ですが、bitdifenderはどこの企業が製造しているのでしょうか。
回答を見る

専門家に質問してみよう