【初心者歓迎】C/C++室 Ver.46【環境依存OK】 at TECH
[2ch|▼Menu]
103:デフォルトの名無しさん
07/12/31 04:10:07
>>102
ありがとうございます。
typenameをつけたら希望どおりの動作になりましたが、その後、
エラーメッセージを張ったら、実はそこに書いてありました。

$ g++ samp20.cpp
samp20.cpp: In function 'void show(T&)':
samp20.cpp:9: error: expected `;' before 'p'
samp20.cpp:10: error: 'p' was not declared in this scope
samp20.cpp: In function 'void show(T&) [with T = std::list<int, std::allocator<int> >]':
samp20.cpp:23: instantiated from here
samp20.cpp:9: error: dependent-name 'T::iterator' is parsed as a non-type, but instantiation yields a type
samp20.cpp:9: note: say 'typename T::iterator' if a type is meant




次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4254日前に更新/166 KB
担当:undef