約 694,601 件
https://w.atwiki.jp/objcmemo/pages/65.html
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ エラーメッセージ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ error #include expects "xxx.h" or xxx.h の後は "xxx.h" か xxx.h と書く error default label not within a switch statement default が switch 文の外にある(switch 文を早く閉じてしまった可能性) error else without a previous if if がないのに else がある error for loop initial declaration used outside C99 mode for 文の中で制御変数が宣言されている(C++ や Java との混同) error xxx has no member named yyy 構造体 xxx には yyy というメンバーはない error xxx redeclared as different kind of symbol xxx が違う種類のシンボルとして二重に宣言されている error xxx undeclared (first use in this function) xxx が宣言されていない error xxx undeclared here (not in a function) xxx が宣言されていない error aggregate value used where a float was expected 浮動小数点型が来るはずのところに,構造体(集合体)が使われている error argument xxx doesn t match prototype xxx の型が関数プロトタイプと一致しない error array size missing in xxx xxx に配列のサイズが無い error array subscript is not an integer 配列の添字の型が整数型じゃない error array type has incomplete element type 配列の型が不完全 error assignment of read-only location (const 修飾子がついていて)読出専用のものに代入しようとしている error assignment of read-only member xxx (const 修飾子がついている構造体の)読出専用のメンバ xxx に代入しようとしている error assignment of read-only variable xxx (const 修飾子がついていて)読出専用の変数 xxx に代入しようとしている error break statement not within loop or switch 繰返しや switch 文以外の場所で break を使っている error called object xxx is not a function xxx は関数じゃないのに関数呼出しのように使っている error cannot convert to a pointer type ポインタ型へは変換できない error case label not within a switch statement switch 文の外で case を使っている(switch 文の括弧の対応がおかしい可能性大) error conflicting type qualifiers for xxx xxx の型修飾子に矛盾がある error conflicting types for xxx xxx の型に矛盾がある error conversion to non-scalar type requested スカラ型以外のものに型変換しようとしている error declaration for parameter xxx but no such parameter xxx の型の引数を宣言しているけど,そんな型は知らない error decrement of read-only location (const 修飾子がついていて)読出専用のものをデクリメントしようとしている error duplicate case value (switch 文の中の) case の値が重複している error duplicate member xxx 構造体のメンバの xxx が重複している error empty character constant 文字定数の中が空っぽ error empty filename in #include の後にファイル名が書かれていない error expected xxx at end of input プログラムの最後に xxx があるはずだが... error expected yyy before xxx (token) xxx の前に yyy があるはずだが... error expected xxx before numeric constant 数値定数の前に xxx があるはずだが... error expected xxx before string constant 文字定数の前に xxx があるはずだが... error expected declaration or statement at end of input まだ続いているはずだけどプログラムが終っちゃった(閉じ括弧をつけ忘れていた場合に起こりやすい) error expected declaration specifiers before xxx (token) xxx の前には宣言があるはずだが...(関数定義の "{" を忘れたときに起こりやすい) error expected declaration specifiers or ... before xxx (token) xxx の前には型に相当するものが来るはずだが... error expected expression at end of input プログラムの最後には式があるはずだが... error expected expression before xxx (token) xxx の前には式があるはずだが... error expected identifier at end of input プログラムの最後には識別子が来るはずだが... error expected identifier before xxx (token) xxx の前には識別子が来るはずだが... error expected identifier before numeric constant 数値定数の前には識別子が来るはずだが... error expected specifier-qualifier-list before xxx (token) xxx の前には型のリストが来るはずだが... error format string argument not a string type 書式指定の文字列が与えられていない error function definition declared typedef 関数定義に typedef がついてる (typedef の最後のセミコロンを忘れている場合など) error incompatible type for argument NNN of xxx 関数 xxx の NNN 番目の引数の型が(仮引数と実引数とで)合わない error incompatible types in assignment 代入で(左辺と右辺の)型が合わない error incompatible types in initialization 変数の初期化で(変数と値の)型が合わない error incompatible types in return returnで返す値の型と関数プロトタイプの戻り値の型が一致しない error increment of read-only location (const 修飾子がついていて)読出専用のものをインクリメントしようとしている error increment of read-only member xxx (const 修飾子がついている構造体の)読出専用のメンバ xxx をインクリメントしようとしている error increment of read-only variable xxx (const 修飾子がついていて)読出専用の変数 xxx をインクリメントしようとしている error initializer element is not constant 初期化式が定数式じゃない error invalid initializer 初期化式の不正 error invalid lvalue in assignment 代入の左辺が変数じゃない error invalid lvalue in decrement デクリメント演算子(--)が変数じゃないものに適用されている error invalid lvalue in increment インクリメント演算子(++)が変数じゃないものに適用されている error invalid lvalue in unary アドレス演算子( )が変数じゃないものに適用されている error invalid operands to binary xxx 二項演算子 xxx の引数の不正 error invalid preprocessing directive #xxx そんな #xxx なんて知らない(#include などの綴り間違いの可能性大) error invalid suffix "xxx" on integer constant 整数の後に xxx が付いている error invalid type argument of - ポインタから構造体のメンバを指定する - の使い方の誤り error invalid type argument of unary * 間接演算子(*)の使い型の誤り(*がポインタじゃないものに付いている) error invalid use of void expression キーワード void の使い方の誤り error label xxx used but not defined xxx というラベルを定義せずに使っている error lvalue required as decrement operand デクリメント演算子(--)の引数は変数じゃなきゃダメ error lvalue required as increment operand インクリメント演算子(++)の引数は変数じゃなきゃダメ error lvalue required as left operand of assignment 代入演算子(=)の左は変数じゃなきゃダメ error lvalue required as unary operand アドレス演算子( )の右に来るのは変数じゃなきゃダメ error missing terminating " character 文字列定数の終わりの「"」がない error missing terminating character 文字定数の終わりの「 」がない error multiple default labels in one switch switch 文に default が複数ある error number of arguments doesn t match prototype 関数プロトタイプ宣言と引数の数が違う error old-style parameter declarations in prototyped function definition 関数の引数リストの宣言の仕方が古いスタイル error parameter name omitted 引数名が省略されている error parameter NNN ( xxx ) has incomplete type NNN 番目の引数 xxx の型が不完全 error previous declaration of xxx was here xxx の前の宣言はココ (conflicting types for xxx とペアで出てくる) error previous definition of xxx was here xxx の前の定義はココ(関数を二重に定義しているような場合) error previous implicit declaration of xxx was here xxx の前の暗黙の宣言はココ error redeclaration of xxx with no linkage xxx が二重に宣言されている error redeclaration of enumerator xxx 列挙型 xxx が二重に宣言されている error redefinition of xxx xxx が二重に定義されている error redefinition of parameter xxx 仮引数 xxx が二重に定義されている error redefinition of typedef xxx xxx が二重に typedef されている error request for member xxx in something not a structure or union 構造体でないのに xxx というメンバを使っている error size of array xxx is too large 配列 xxx の要素数が大きすぎ error stray \xxx in program プログラム中で,文字列やコメント以外の場所に全角文字を使用した際によく出るエラー. 特に,全角空白を使用すると,見た目ではわからないので発見が難しいが, このエラーメッセージに示されている行を探すと見つかるはず. error subscripted value is neither array nor pointer 配列で(もポインタでも)ないものに添字([i]など)を使用している error switch quantity not an integer switch 文の()の中に整数以外のものが来ている(switch 文で扱えるのは値が整数になるもののみ) error syntax error at end of input プログラムの最後に構文エラーあり error syntax error before xxx (token) xxx の前に構文エラーあり error syntax error before numeric constant 数値定数の前に構文エラーあり error syntax error before string constant 文字列定数の前に構文エラーあり error too few arguments to function xxx 関数 xxx の呼び出しの際の引数(実引数)が少なすぎ error too many arguments to function xxx 関数 xxx の呼び出しの際の引数(実引数)が多すぎ error too many decimal points in number 数値に小数点が多すぎ(2個以上ついてる) error two or more data types in declaration specifiers 型宣言において複数の型が指定されている error unrecognized command line option "xxx" cc コマンドのオプションで xxx なんてのは知らない error unterminated comment コメントが終了していない error used struct type value where scalar is required (int 型や double 型などの)スカラ値が来なきゃいけないところに構造体を使っている error variable or field xxx declared void 変数 xxx の型が void 型になってる error variable-sized object may not be initialized 可変長のオブジェクトが初期化されていない可能性 error void value not ignored as it ought to be void 型(の関数の戻り値)を使おうとしている error wrong type argument to decrement デクリメント演算子(--)の引数の型が違う error wrong type argument to increment インクリメント演算子(++)の引数の型が違う error wrong type argument to unary exclamation mark 否定演算子(!)の引数の型が違う 【警告メッセージ】 warning "/*" within comment コメント中に /* があるけど... warning "XXX" redefined XXX を #define で重複して定義している warning return with a value, in function returning void 戻り値の型が void 型の関数なのに return で値を返している warning struct xxx declared inside parameter list struct xxx の宣言が引数リストの中で行なわれている warning xxx is used uninitialized in this function この関数内で xxx が初期化しないまま使われている warning xxx may be used uninitialized in this function この関数内で xxx が初期化しないまま使われている warning array subscript has type char 配列の添字の型が char 型(文字型)になっている warning assignment discards qualifiers from pointer target type 代入の際,代入元にあった型修飾子が捨てられた warning assignment from incompatible pointer type 互換性のないポインタ型からの代入 warning assignment makes integer from pointer without a cast ポインタを整数に(キャストなしで)代入しようとしている warning assignment makes pointer from integer without a cast 整数をポインタに(キャストなしで)代入しようとしている warning backslash and newline separated by space バックスラッシュ(\)と改行の間に空白がある (行が長すぎるとき,見やすくなるように改行して次の行に続けて書くんだけど,プログラムとしては 一行として扱って欲しい場合がある.そういった場合,前の行の行末にバックスラッシュ(\)を入れてそ の直後で改行してやれば,後続の行は「継続行」となり一行として扱ってくれる.ところが,バックス ラッシュと改行の間に空白文字などの目に見えない余計なものが入っていると継続行とはならないの で,それに対する注意.) warning cast from pointer to integer of different size ポインタをサイズの異なる整数にキャストしている warning character constant too long for its type 文字定数が長すぎ(文字定数と文字列定数の混同?) warning comparison between pointer and integer ポインタと整数を比較している warning comparison is always false due to limited range of data type データ型の範囲の制限により,比較結果はつねに偽(false)になる warning comparison is always true due to limited range of data type データ型の範囲の制限により,比較結果はつねに真(true)になる warning comparison of distinct pointer types lacks a cast 異ったポインタ型を比較している warning conflicting types for xxx xxx の型に矛盾がある warning conflicting types for built-in function xxx 組込み関数 xxx の型に矛盾がある warning control reaches end of non-void function 値を返す関数なのに,return なしに関数の終わりまで来ちゃった warning data definition has no type or storage class データの定義に型or記憶クラスがない(typedef struct ... のあたりで間違えている可能性大) warning excess elements in scalar initializer 初期化式中の要素が多すぎ warning format %xxx expects type yyy , but argument NNN has type zzz printf の書式の %xxx には yyy の型を与えなきゃいけないけど,NNN 番目の引数で zzz の型を与えている warning function returns address of local variable (関数内で宣言した)局所変数のアドレスを return で返している warning implicit declaration of function xxx 関数 xxx の暗黙のプロトタイプ宣言 warning incompatible implicit declaration of built-in function xxx 関数 xxx の暗黙のプロトタイプ宣言が不整合(プロトタイプ宣言を忘れたときに起こる) warning initialization from incompatible pointer type ポインタ変数の初期化式が不整合 warning initialization makes integer from pointer without a cast 整数の変数の初期化式にポインタを与えている warning initialization makes pointer from integer without a cast ポインタ変数の初期化式に整数を与えている warning initializer-string for array of chars is too long 文字配列の初期化用の文字列が長すぎ(配列の長さを超えている) warning left-hand operand of comma expression has no effect カンマ演算子(,)の左側は何の効果もない warning missing whitespace after the macro name #define する記号名の後には空白文字(スペース記号,タブ,改行など)が必要 warning multi-character character constant 文字列定数なのに複数文字がある ( \0 と書くべきところを /0 と書いてしまった場合など) warning no newline at end of file ファイルの最後に改行がない warning no semicolon at end of struct or union 構造体の定義の最後にセミコロンがない warning overflow in implicit constant conversion 定数の暗黙の変換でオーバーフローが起きた warning parameter names (without types) in function declaration 関数の引数が名前だけで型が指定されていない(int x と書くべきところを x とだけ書いた場合など) warning passing argument NNN of xxx discards qualifiers from pointer target type 関数 xxx の NNN 番目の引数で渡したポインタの修飾子(qualifires)を放棄した warning passing argument NNN of xxx from incompatible pointer type 関数 xxx の NNN 番目の引数に一致しないポインタ型が渡されている warning passing argument NNN of xxx makes integer from pointer without a cast 関数 xxx の NNN 番目の引数でポインタが要求されているところに整数を渡した warning passing argument NNN of xxx makes pointer from integer without a cast 関数 xxx の NNN 番目の引数に渡した整数がキャストなしでポインタにされている (仮引数はポインタなのに実引数として整数を渡している) warning previous declaration of xxx was here xxx の前の宣言はココ (conflicting types for xxx とペアで出てくる) warning previous implicit declaration of xxx was here xxx の前の暗黙の宣言はココ warning return from incompatible pointer type 型の一致しないポインタ型を返そうとしている warning return makes integer from pointer without a cast 整数を返すべきところでポインタを返している warning return makes pointer from integer without a cast ポインタを返すべきところで整数を返している warning return type defaults to int (戻り値の型がないので)戻り値の型をint型にした warning return type of main is not int main 関数の戻り値の型が int になってない warning statement with no effect この文は何の効果もない(値を計算しているだけで捨てていて,何にも代入していない可能性大) warning suggest explicit braces to avoid ambiguous else (if 文の入れ子で) else の範囲が曖昧なので,明示的に括弧({ と })をつけた方が良い warning suggest parentheses around assignment used as truth value 代入した値を条件式の中で使う場合は括弧で囲む方が良い(== を = に間違えた場合などに発生) warning the `gets function is dangerous and should not be used. 関数 gets は危険なので使うべきじゃない warning too few arguments for format printf 中にある(%d などの)書式指定の数に比べて,引数で与えたものの数が少なすぎ warning too many arguments for format printf 中にある(%d などの)書式指定の数に比べて,引数で与えたものの数が多すぎ warning unknown escape sequence \xxx \xxx なんていうエスケープ文字は知らない warning unused variable xxx 変数 xxx を宣言してるけど使っていない warning value computed is not used 計算した値を使っていない 【その他】 filename.c (.text+0x???) undefined reference to xxx collect2 ld returned 1 exit status xxx という関数を使っているが,作成されていないときに起きるエラー 本当に作っていない場合の他に,関数名を間違えている場合にも起きる テキスト形式の添付ファイル[スキャンして保存 | Yahoo!ボックスに保存] 【エラーメッセージ】 error #include expects "xxx.h" or xxx.h の後は "xxx.h" か xxx.h と書く error default label not within a switch statement default が switch 文の外にある(switch 文を早く閉じてしまった可能性) error else without a previous if if がないのに else がある error for loop initial declaration used outside C99 mode for 文の中で制御変数が宣言されている(C++ や Java との混同) error xxx has no member named yyy 構造体 xxx には yyy というメンバーはない error xxx redeclared as different kind of symbol xxx が違う種類のシンボルとして二重に宣言されている error xxx undeclared (first use in this function) xxx が宣言されていない error xxx undeclared here (not in a function) xxx が宣言されていない error aggregate value used where a float was expected 浮動小数点型が来るはずのところに,構造体(集合体)が使われている error argument xxx doesn t match prototype xxx の型が関数プロトタイプと一致しない error array size missing in xxx xxx に配列のサイズが無い error array subscript is not an integer 配列の添字の型が整数型じゃない error array type has incomplete element type 配列の型が不完全 error assignment of read-only location (const 修飾子がついていて)読出専用のものに代入しようとしている error assignment of read-only member xxx (const 修飾子がついている構造体の)読出専用のメンバ xxx に代入しようとしている error assignment of read-only variable xxx (const 修飾子がついていて)読出専用の変数 xxx に代入しようとしている error break statement not within loop or switch 繰返しや switch 文以外の場所で break を使っている error called object xxx is not a function xxx は関数じゃないのに関数呼出しのように使っている error cannot convert to a pointer type ポインタ型へは変換できない error case label not within a switch statement switch 文の外で case を使っている(switch 文の括弧の対応がおかしい可能性大) error conflicting type qualifiers for xxx xxx の型修飾子に矛盾がある error conflicting types for xxx xxx の型に矛盾がある error conversion to non-scalar type requested スカラ型以外のものに型変換しようとしている error declaration for parameter xxx but no such parameter xxx の型の引数を宣言しているけど,そんな型は知らない error decrement of read-only location (const 修飾子がついていて)読出専用のものをデクリメントしようとしている error duplicate case value (switch 文の中の) case の値が重複している error duplicate member xxx 構造体のメンバの xxx が重複している error empty character constant 文字定数の中が空っぽ error empty filename in #include の後にファイル名が書かれていない error expected xxx at end of input プログラムの最後に xxx があるはずだが... error expected yyy before xxx (token) xxx の前に yyy があるはずだが... error expected xxx before numeric constant 数値定数の前に xxx があるはずだが... error expected xxx before string constant 文字定数の前に xxx があるはずだが... error expected declaration or statement at end of input まだ続いているはずだけどプログラムが終っちゃった(閉じ括弧をつけ忘れていた場合に起こりやすい) error expected declaration specifiers before xxx (token) xxx の前には宣言があるはずだが...(関数定義の "{" を忘れたときに起こりやすい) error expected declaration specifiers or ... before xxx (token) xxx の前には型に相当するものが来るはずだが... error expected expression at end of input プログラムの最後には式があるはずだが... error expected expression before xxx (token) xxx の前には式があるはずだが... error expected identifier at end of input プログラムの最後には識別子が来るはずだが... error expected identifier before xxx (token) xxx の前には識別子が来るはずだが... error expected identifier before numeric constant 数値定数の前には識別子が来るはずだが... error expected specifier-qualifier-list before xxx (token) xxx の前には型のリストが来るはずだが... error format string argument not a string type 書式指定の文字列が与えられていない error function definition declared typedef 関数定義に typedef がついてる (typedef の最後のセミコロンを忘れている場合など) error incompatible type for argument NNN of xxx 関数 xxx の NNN 番目の引数の型が(仮引数と実引数とで)合わない error incompatible types in assignment 代入で(左辺と右辺の)型が合わない error incompatible types in initialization 変数の初期化で(変数と値の)型が合わない error incompatible types in return returnで返す値の型と関数プロトタイプの戻り値の型が一致しない error increment of read-only location (const 修飾子がついていて)読出専用のものをインクリメントしようとしている error increment of read-only member xxx (const 修飾子がついている構造体の)読出専用のメンバ xxx をインクリメントしようとしている error increment of read-only variable xxx (const 修飾子がついていて)読出専用の変数 xxx をインクリメントしようとしている error initializer element is not constant 初期化式が定数式じゃない error invalid initializer 初期化式の不正 error invalid lvalue in assignment 代入の左辺が変数じゃない error invalid lvalue in decrement デクリメント演算子(--)が変数じゃないものに適用されている error invalid lvalue in increment インクリメント演算子(++)が変数じゃないものに適用されている error invalid lvalue in unary アドレス演算子( )が変数じゃないものに適用されている error invalid operands to binary xxx 二項演算子 xxx の引数の不正 error invalid preprocessing directive #xxx そんな #xxx なんて知らない(#include などの綴り間違いの可能性大) error invalid suffix "xxx" on integer constant 整数の後に xxx が付いている error invalid type argument of - ポインタから構造体のメンバを指定する - の使い方の誤り error invalid type argument of unary * 間接演算子(*)の使い型の誤り(*がポインタじゃないものに付いている) error invalid use of void expression キーワード void の使い方の誤り error label xxx used but not defined xxx というラベルを定義せずに使っている error lvalue required as decrement operand デクリメント演算子(--)の引数は変数じゃなきゃダメ error lvalue required as increment operand インクリメント演算子(++)の引数は変数じゃなきゃダメ error lvalue required as left operand of assignment 代入演算子(=)の左は変数じゃなきゃダメ error lvalue required as unary operand アドレス演算子( )の右に来るのは変数じゃなきゃダメ error missing terminating " character 文字列定数の終わりの「"」がない error missing terminating character 文字定数の終わりの「 」がない error multiple default labels in one switch switch 文に default が複数ある error number of arguments doesn t match prototype 関数プロトタイプ宣言と引数の数が違う error old-style parameter declarations in prototyped function definition 関数の引数リストの宣言の仕方が古いスタイル error parameter name omitted 引数名が省略されている error parameter NNN ( xxx ) has incomplete type NNN 番目の引数 xxx の型が不完全 error previous declaration of xxx was here xxx の前の宣言はココ (conflicting types for xxx とペアで出てくる) error previous definition of xxx was here xxx の前の定義はココ(関数を二重に定義しているような場合) error previous implicit declaration of xxx was here xxx の前の暗黙の宣言はココ error redeclaration of xxx with no linkage xxx が二重に宣言されている error redeclaration of enumerator xxx 列挙型 xxx が二重に宣言されている error redefinition of xxx xxx が二重に定義されている error redefinition of parameter xxx 仮引数 xxx が二重に定義されている error redefinition of typedef xxx xxx が二重に typedef されている error request for member xxx in something not a structure or union 構造体でないのに xxx というメンバを使っている error size of array xxx is too large 配列 xxx の要素数が大きすぎ error stray \xxx in program プログラム中で,文字列やコメント以外の場所に全角文字を使用した際によく出るエラー. 特に,全角空白を使用すると,見た目ではわからないので発見が難しいが, このエラーメッセージに示されている行を探すと見つかるはず. error subscripted value is neither array nor pointer 配列で(もポインタでも)ないものに添字([i]など)を使用している error switch quantity not an integer switch 文の()の中に整数以外のものが来ている(switch 文で扱えるのは値が整数になるもののみ) error syntax error at end of input プログラムの最後に構文エラーあり error syntax error before xxx (token) xxx の前に構文エラーあり error syntax error before numeric constant 数値定数の前に構文エラーあり error syntax error before string constant 文字列定数の前に構文エラーあり error too few arguments to function xxx 関数 xxx の呼び出しの際の引数(実引数)が少なすぎ error too many arguments to function xxx 関数 xxx の呼び出しの際の引数(実引数)が多すぎ error too many decimal points in number 数値に小数点が多すぎ(2個以上ついてる) error two or more data types in declaration specifiers 型宣言において複数の型が指定されている error unrecognized command line option "xxx" cc コマンドのオプションで xxx なんてのは知らない error unterminated comment コメントが終了していない error used struct type value where scalar is required (int 型や double 型などの)スカラ値が来なきゃいけないところに構造体を使っている error variable or field xxx declared void 変数 xxx の型が void 型になってる error variable-sized object may not be initialized 可変長のオブジェクトが初期化されていない可能性 error void value not ignored as it ought to be void 型(の関数の戻り値)を使おうとしている error wrong type argument to decrement デクリメント演算子(--)の引数の型が違う error wrong type argument to increment インクリメント演算子(++)の引数の型が違う error wrong type argument to unary exclamation mark 否定演算子(!)の引数の型が違う 【警告メッセージ】 warning "/*" within comment コメント中に /* があるけど... warning "XXX" redefined XXX を #define で重複して定義している warning return with a value, in function returning void 戻り値の型が void 型の関数なのに return で値を返している warning struct xxx declared inside parameter list struct xxx の宣言が引数リストの中で行なわれている warning xxx is used uninitialized in this function この関数内で xxx が初期化しないまま使われている warning xxx may be used uninitialized in this function この関数内で xxx が初期化しないまま使われている warning array subscript has type char 配列の添字の型が char 型(文字型)になっている warning assignment discards qualifiers from pointer target type 代入の際,代入元にあった型修飾子が捨てられた warning assignment from incompatible pointer type 互換性のないポインタ型からの代入 warning assignment makes integer from pointer without a cast ポインタを整数に(キャストなしで)代入しようとしている warning assignment makes pointer from integer without a cast 整数をポインタに(キャストなしで)代入しようとしている warning backslash and newline separated by space バックスラッシュ(\)と改行の間に空白がある (行が長すぎるとき,見やすくなるように改行して次の行に続けて書くんだけど,プログラムとしては 一行として扱って欲しい場合がある.そういった場合,前の行の行末にバックスラッシュ(\)を入れてそ の直後で改行してやれば,後続の行は「継続行」となり一行として扱ってくれる.ところが,バックス ラッシュと改行の間に空白文字などの目に見えない余計なものが入っていると継続行とはならないの で,それに対する注意.) warning cast from pointer to integer of different size ポインタをサイズの異なる整数にキャストしている warning character constant too long for its type 文字定数が長すぎ(文字定数と文字列定数の混同?) warning comparison between pointer and integer ポインタと整数を比較している warning comparison is always false due to limited range of data type データ型の範囲の制限により,比較結果はつねに偽(false)になる warning comparison is always true due to limited range of data type データ型の範囲の制限により,比較結果はつねに真(true)になる warning comparison of distinct pointer types lacks a cast 異ったポインタ型を比較している warning conflicting types for xxx xxx の型に矛盾がある warning conflicting types for built-in function xxx 組込み関数 xxx の型に矛盾がある warning control reaches end of non-void function 値を返す関数なのに,return なしに関数の終わりまで来ちゃった warning data definition has no type or storage class データの定義に型or記憶クラスがない(typedef struct ... のあたりで間違えている可能性大) warning excess elements in scalar initializer 初期化式中の要素が多すぎ warning format %xxx expects type yyy , but argument NNN has type zzz printf の書式の %xxx には yyy の型を与えなきゃいけないけど,NNN 番目の引数で zzz の型を与えている warning function returns address of local variable (関数内で宣言した)局所変数のアドレスを return で返している warning implicit declaration of function xxx 関数 xxx の暗黙のプロトタイプ宣言 warning incompatible implicit declaration of built-in function xxx 関数 xxx の暗黙のプロトタイプ宣言が不整合(プロトタイプ宣言を忘れたときに起こる) warning initialization from incompatible pointer type ポインタ変数の初期化式が不整合 warning initialization makes integer from pointer without a cast 整数の変数の初期化式にポインタを与えている warning initialization makes pointer from integer without a cast ポインタ変数の初期化式に整数を与えている warning initializer-string for array of chars is too long 文字配列の初期化用の文字列が長すぎ(配列の長さを超えている) warning left-hand operand of comma expression has no effect カンマ演算子(,)の左側は何の効果もない warning missing whitespace after the macro name #define する記号名の後には空白文字(スペース記号,タブ,改行など)が必要 warning multi-character character constant 文字列定数なのに複数文字がある ( \0 と書くべきところを /0 と書いてしまった場合など) warning no newline at end of file ファイルの最後に改行がない warning no semicolon at end of struct or union 構造体の定義の最後にセミコロンがない warning overflow in implicit constant conversion 定数の暗黙の変換でオーバーフローが起きた warning parameter names (without types) in function declaration 関数の引数が名前だけで型が指定されていない(int x と書くべきところを x とだけ書いた場合など) warning passing argument NNN of xxx discards qualifiers from pointer target type 関数 xxx の NNN 番目の引数で渡したポインタの修飾子(qualifires)を放棄した warning passing argument NNN of xxx from incompatible pointer type 関数 xxx の NNN 番目の引数に一致しないポインタ型が渡されている warning passing argument NNN of xxx makes integer from pointer without a cast 関数 xxx の NNN 番目の引数でポインタが要求されているところに整数を渡した warning passing argument NNN of xxx makes pointer from integer without a cast 関数 xxx の NNN 番目の引数に渡した整数がキャストなしでポインタにされている (仮引数はポインタなのに実引数として整数を渡している) warning previous declaration of xxx was here xxx の前の宣言はココ (conflicting types for xxx とペアで出てくる) warning previous implicit declaration of xxx was here xxx の前の暗黙の宣言はココ warning return from incompatible pointer type 型の一致しないポインタ型を返そうとしている warning return makes integer from pointer without a cast 整数を返すべきところでポインタを返している warning return makes pointer from integer without a cast ポインタを返すべきところで整数を返している warning return type defaults to int (戻り値の型がないので)戻り値の型をint型にした warning return type of main is not int main 関数の戻り値の型が int になってない warning statement with no effect この文は何の効果もない(値を計算しているだけで捨てていて,何にも代入していない可能性大) warning suggest explicit braces to avoid ambiguous else (if 文の入れ子で) else の範囲が曖昧なので,明示的に括弧({ と })をつけた方が良い warning suggest parentheses around assignment used as truth value 代入した値を条件式の中で使う場合は括弧で囲む方が良い(== を = に間違えた場合などに発生) warning the `gets function is dangerous and should not be used. 関数 gets は危険なので使うべきじゃない warning too few arguments for format printf 中にある(%d などの)書式指定の数に比べて,引数で与えたものの数が少なすぎ warning too many arguments for format printf 中にある(%d などの)書式指定の数に比べて,引数で与えたものの数が多すぎ warning unknown escape sequence \xxx \xxx なんていうエスケープ文字は知らない warning unused variable xxx 変数 xxx を宣言してるけど使っていない warning value computed is not used 計算した値を使っていない 【その他】 filename.c (.text+0x???) undefined reference to xxx collect2 ld returned 1 exit status xxx という関数を使っているが,作成されていないときに起きるエラー 本当に作っていない場合の他に,関数名を間違えている場合にも起きる
https://w.atwiki.jp/akios/pages/77.html
4. 型と値と変数 4.1. 型と変数の種類 4.2. プリミティブ型と値 4.3. 参照型と値 4.4. 型変数 4.5. 引数付き型 4.6. 型の抹消 4.7. 具象可能型 4.8. 未加工型 4.9. 交差型 4.10. サブタイプ化 4.11. 型の使用箇所 宣言や特定の式内において型は使用されます。 例4.11-1. 型の使用 import java.util.Random; import java.util.Collection; import java.util.ArrayList; class MiscMath T extends Number { int divisor; MiscMath(int divisor) { this.divisor = divisor; } float ratio(long l) { try { l /= divisor; } catch (Exception e) { if (e instanceof ArithmeticException) l = Long.MAX_VALUE; else l = 0; } return (float)l; } double gausser() { Random r = new Random(); double[] val = new double[2]; val[0] = r.nextGaussian(); val[1] = r.nextGaussian(); return (val[0] + val[1]) / 2; } Collection Number fromArray(Number[] na) { Collection Number cn = new ArrayList Number (); for (Number n na) cn.add(n); return cn; } S void loop(S s) { this. S loop(s); } } この例では型は以下の宣言内で使用されています。 インポートされた型、ここでは型Randomが、パッケージakios.util.Randomよりインポートされて宣言されています。 フィールド(とはクラス変数やクラスのインスタンス変数(8.3.)やインタフェースの定数(9.3.))、ここではクラス型MiscMathのフィールドdivisorがint型であると宣言されています。 メソッド引数、ここではメソッドratioの引数lがlong型であると宣言されています。 メソッド戻り値、ここではメソッドratioの戻り値がfloat型であると宣言されています。さらに、メソッドgausserの戻り値がdoubleであると宣言されています。 コンストラクター引数、ここではMiscMathのコンストラクター引数がint型であると宣言されています。 局所変数(14.4.、14.14.)、ここではメソッドgausserのローカル変数rとvalがそれぞれRandom型、double[]型(doubleの配列)であると宣言されています。 例外引数、ここではcatch節の例外引数eがException型であると宣言されています。 型引数、ここではMiscMathの型引数がNumber型を制限とした型変数Tが宣言されています。 引数付き型を使用する宣言内、ここではNumber型が引数付き型Collection number の型実引数として使用されています。 さらに以下の種類の式で型が使用されています。 クラスインスタンス作成、ここではメソッドgausserのローカル変数rがRandom型を使用するクラスインスタンス作成式によって初期化されています。 ジェネリッククラスのクラスインスタンス作成、ここではNumberがnew ArrayList Number ()式の型実引数として使われています。 配列作成、ここではメソッドgausserのローカル変数valが2個のdoubleの配列を作成する配列作成式によって初期化されています。 ジェネリックメソッドやコンストラクター、ここではメソッドloopが明示的型実引数Sを伴って呼び出されています。 キャスト、ここではメソッドratioのreturn文でfloat型へのキャストが使われています。 instanceof演算子、ここではinstanceof演算子によってeがArithmeticException型と代入互換(assignment-compatible)であるか判定しています。 4.12. 変数
https://w.atwiki.jp/keisks/pages/421.html
どちらがどちらかわからなくなるときがあるのでメモ。 http //note.crohaco.net/2014/python-argument-intro/
https://w.atwiki.jp/miracle_mikuru/pages/98.html
isspace の引数は int だが、その値は UCHAR または EOF でなければいけない。(-1~255)
https://w.atwiki.jp/introtopython/pages/11.html
目次 目次 基本操作 文字列の長さを調べる 文字列を連結する 文字列の指定した一部を取り出す 文字列の前後の空白を取り除く 文字列を数値に変換する 文字の文字コードを簡単に調べる raw文字列を使う 応用操作 同じ文字列が繰り返された文字列を作る 指定した長さの空白(0x20)文字列を作る 桁を変数で指定して書式化する 基本操作 文字列の長さを調べる len関数を使う。 len( ABC ) 3 len( あい ) 2 len( 阿伊宇ab ) 5 文字列を連結する +演算子を使う。 s = a + bc + def print(s) abcdef 文字列の指定した一部を取り出す スライス演算子を使う。インデックスの開始は0である。取り出す範囲の指定は、開始のインデックスは、取り出すその文字のインデックスを、終わりのインデックスは、取り出す文字の次のインデックスを指定することに注意。 s = "ABC123あいう" s[0] A s[1] B s[0 3] ABC s[5 8] 3あい s[5 ] 3あいう s[ 4] ABC1 文字列の前後の空白を取り除く strip関数、lstrip関数、rstrip関数を使う。それぞれ、前後、前だけ、後ろだけの空白(0x20)を削除した文字列を返す。 s = AB C DE s AB C DE s.strip() AB C DE s.lstrip() AB C DE s.rstrip() AB C DE 文字列を数値に変換する 整数の場合はint関数、小数の場合はfloat関数を使用する。 int( 1 ) 1 int( 1 ) + int( 20 ) 21 int( 0.1 ) Traceback (most recent call last) File "", line 1, in ValueError invalid literal for int() with base 10 0.1 float( 0.1 ) 0.1 float( 0.1 ) + float( 1.5 ) 1.6 int関数もfloat関数も、引数に指定した文字列に空白が含まれていてもかまわない。int関数に小数を指定すると、エラーが発生する。 文字の文字コードを簡単に調べる encodeメソッドを使用する。以下は、文字列「あい亜井」のそれぞれの文字の文字コードを調べた例。なお、これら文字の文字コード(左から、文字、その文字のシフトJISコード、その文字のutf-8コード)は以下のとおり(0xは16進数であることを示す接頭語)。 あ 0x82A0 0xE38182 い 0x82A2 0xE38184 亜 0x889F 0xE4BA9C 井 0x88E4 0xE4BA95 s = "あい亜井" s.encode("sjis") b \x82\xa0\x82\xa2\x88\x9f\x88\xe4 s.encode("utf-8") b \xe3\x81\x82\xe3\x81\x84\xe4\xba\x9c\xe4\xba\x95 文字型変数を使用しなくても、文字列に直接使用することもできる。 "あい亜井".encode("sjis") b \x82\xa0\x82\xa2\x88\x9f\x88\xe4 raw文字列を使う raw文字列とは、エスケープシーケンスを無効にして、表記のままに文字列を解釈する文字列リテラルのこと。文字列リテラルの先頭にrをつけて表記する。 s = "a\nbc\ndef" print(s) a bc def s = r"a\nbc\ndef" print(s) a\nbc\ndef Windowsのパス区切り記号¥(円記号)は、普通の文字列リテラルでは「\\」(\を2つ)と表記する必要があるが、raw文字列を使うとそのまま書くことができる。 s = "C \\Windows\\System" print(s) C \Windows\System s = r"C \Windows\System" print(s) C \Windows\System 応用操作 同じ文字列が繰り返された文字列を作る *演算子を使う。 A * 3 AAA Abc * 4 AbcAbcAbcAbc 指定した長さの空白(0x20)文字列を作る 文字列リテラルと*演算子を使う。 s = * 7 len(s) 7 print( + s + ) 桁を変数で指定して書式化する formatメソッドまたは整形済み文字列リテラル(f文字列)を使用する。以下は、数値1.23456789を小数点以下4桁で表示(1.2346、四捨五入の処理により1.2345にはならない)するために、小数点以下4桁の指定(.4f)を、変数で指定した例。 d = 1.23456789 n = 4 print( { .{}f} .format(d, n)) 1.2346 print(f {d .{n}f} ) 1.2346 名前 コメント
https://w.atwiki.jp/wiki7_kaze/
ここではHP作成についての講座です。 風の引力の素材を使って説明していきます。 分からない人でもコピペして使えるようにしています。 まだ出来ていないページが多いのですが・・・もっと増やす予定なので(^^ゞ
https://w.atwiki.jp/kazu51ww/pages/10.html
argument 『引数』は【関数】や【サブルーチン】を利用する時に、 関数やサブルーチンに対して ・動作条件を指定する ・処理結果を受け取る という為に使うものです。機能的にはこれだけです。 例え話で説明してみますと。 サブルーチン:八百屋へお使いを頼んだ子供 処理内容 :お買い物 引数1 :買い物リスト 引数2 :サイフ 引数3 :買い物かご 単に「八百屋へ行ってきて」では子供も何を買ってくればいいのか判りませんよね。 そこで「買い物リスト」に”大根1本”と書いて持たせてやります。 買い物にはお金が要りますから「サイフ」に”千円”を入れて持たせてやります。 買った物を裸で持ってくるのはなんですから、「買い物かご」も持たせましょう。 『さあ、いってらっしゃい』と子供を送り出すのが【サブルーチンの実行】に相当します。 『サブルーチン:子供のお使い』は八百屋さんに着くと、引数『買い物リスト』に書いてある ”大根1本”と引数『サイフ』に入っている”千円”で買い物をします。 八百屋さんは、大根とお釣りをくれたので、大根を引数『買い物かご』に入れ、お釣りを 引数『サイフ』に戻します。 ^^^^ 『サブルーチン:子供のお使い』は家に帰ってくると、引数『買い物かご』から大根を、 引数『サイフ』からお釣りをお母さんに渡します。 このように、引数には、使い方によって ・値を渡すだけ ‥‥‥‥‥‥ 買い物リスト ・値を受け取るだけ ‥‥‥‥ 買い物かご ・値を渡す&値を受け取る‥‥ サイフ の3種類があります。 また引数には【属性】があります。 「買い物リスト」の属性は”大根1本”などの【八百屋さんで売っている物】 「サイフ」の属性は【お金】 「買い物かご」の属性は【買った物を入れる】 「買い物リスト」に”ビール”と書いたり、「サイフ」に”葉っぱ”を入れて 子供を八百屋さんに送り出しても買い物は出来ませんよね。 引数には、その属性に合った値を設定しなければ、正しく動作しません。 『エラーが有ります』というメッセージを表示してExcelに怒られてしまいます。 子供が八百屋さんに怒られて、「買い物できないよ。どうする?」と お母さんに電話するのに相当します。
https://w.atwiki.jp/opfan/pages/884.html
主に薫桜ノ皇国で見られる長柄の槍。 その名の通り穂の根元から二本の両刃の鎌刃が伸びた十字型の穂先を持つ。 刺突だけでなく、横に広く伸びた刃を活かした斬撃も可能。 達人が扱えば非常に多彩な戦法を取る事が出来、『突けば槍、払えば薙刀、引けば鎌』とも評される。 関連 薫桜ノ皇国 目次に戻る
https://w.atwiki.jp/javastudy/pages/33.html
第7章 ★文字の読み込み ■テキストファイルの読み込み手順 ①ファイルを開く FileReader(ストリームクラス)のオブジェクトを生成してファイルを開く FileReader in = new FileReader(“file1.txt”); ②データを読み込む read()メソッドを使用する。読み込んだ文字をint型の整数で返す。 読み込むデータがなくなるとー1を返す。 int c; c = in.read(); ③ファイルを閉じる close()メソッドを使用 in.close(); ※ファイルを最後まで読み込む場合はread()メソッドがー1を返すまで読み込みを繰り返す。 int c; String s = new String(); While((c = in.read()) ! = -1) s = s + (char)c; ↑読み込んだデータを文字型に変換し、Stringクラスのオブジェクトに代入 ■ サンプルプログラム import java.io.*; class ReadText { public static void main(String[] args) { try { FileReader in = new FileReader(args[0]); int c; String s = new String(); while((c = in.read()) ! = -1) s = s + (char)c; System.out.println(s); in.close(); }catch (IOException ie) { System.out.println("ファイルがありません"); }catch (Exception e) { System.out.println("ファイル指定がありません"); } } }
https://w.atwiki.jp/knowledge_library/pages/98.html
参照クラス型の自動型変換 ダウンキャスト instanceof 引数におけるクラス型の自動型変換 クラス型の戻り値の自動型変換 参照クラス型の自動型変換 同じ継承ツリーの中で、サブクラスの参照をスーパークラスの変数へ代入できる 継承ツリーの矢印の向きにのみ可能 オブジェクトは不変で元の型のままである 参照がアクセスできるオブジェクトの範囲は変数の方によって決まる アップキャスト 親クラス ←代入 子クラス ←代入 孫クラス ダウンキャスト 継承ツリーの矢印と逆向きの代入はキャストが必要 親クラス 代入→X 子クラス 代入→X 孫クラス (型名) xxx instanceof 参照しているオブジェクトがどんな型なのかを知る演算子 変数 instanceof 型 引数におけるクラス型の自動型変換 メソッドの引数が参照型の場合、メソッドを呼び出す側の実引数には、指定されている型のサブクラスを使用することが出来る。 これは基本データ型の場合と同様に、実引数= 仮引数の間で自動型変換が起こるからです。 クラス型の戻り値の自動型変換 メソッドの戻り値が参照型の場合、戻り値型に指定されている型のサブクラスを返すことが出来る