2012-03-16 29 views
4

...これらの問題を解決するにはどうすればよいでしょうか?IntellisenseのC++/CLIエラー、細かいコンパイル

Visual Studio 2011 Beta、いくつかのフレームワークを準備して、問題の限定リストを調べようとしました。

コードは次のとおり

String^ pUser = (System::String^) pConnectionStringBuilder["UserName"]; 
String^ pPass = (System::String^) pConnectionStringBuilder["Password"]; 
String^ pBroker = (System::String^) pConnectionStringBuilder["Broker"]; 

pConnectionStringBuilderはConnectionStringBuilderのインスタンスです。

エラー:

2 IntelliSense: expression must have pointer-to-object or handle-to-CLI-array type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 62 39 Tradex.Connectivity.Rithmic 
3 IntelliSense: expression must have integral or unscoped enum type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 62 64 Tradex.Connectivity.Rithmic 
4 IntelliSense: expression must have pointer-to-object or handle-to-CLI-array type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 63 39 Tradex.Connectivity.Rithmic 
5 IntelliSense: expression must have integral or unscoped enum type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 63 64 Tradex.Connectivity.Rithmic 
6 IntelliSense: expression must have pointer-to-object or handle-to-CLI-array type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 64 41 Tradex.Connectivity.Rithmic 
7 IntelliSense: expression must have integral or unscoped enum type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 64 66 Tradex.Connectivity.Rithmic 
8 IntelliSense: expression must have pointer-to-object or handle-to-CLI-array type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 269 6 Tradex.Connectivity.Rithmic 
9 IntelliSense: expression must have integral or unscoped enum type c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 269 32 Tradex.Connectivity.Rithmic 

と、彼らは単に全く意味をなさない;)

の2つのがあり、他の警告はあるが、非常に明らかにそれはエラーではありません。

1> TRADEX .comconnectivity.Rithmic.vcxproj - > C:¥Work¥Tradex¥Source¥Debug¥Tradex.Connectivity.Rithmic.dll rithmicconnector.cpp(104):警告:C6001:初期化されていないメモリ 'oParams'を使用しています。 rithmicconnector.cpp(108):警告:C6001:初期化されていないメモリ 'oLoginParams'を使用しています。 1>コード分析の完了 - 0エラー、0警告

コンパイルが正常です。

私はpConnectionStringBuilder-> defaultを使用しようとしました。偶然にも間違っていると、それはコンパイル

2 IntelliSense: class "System::Data::Common::DbConnectionStringBuilder" has no member "default" c:\Work\Tradex\Source\Tradex.Connectivity.Rithmic\RithmicConnector.cpp 62 65 Tradex.Connectivity.Rithmic 

;)

は、私は本当にインテリセンスエラーを持っていないことを好みます。

+1

明らかに、ここにキーボードの椅子のインターフェイスの問題があり、そのモジュールを交換すれば問題はなくなります:) –

答えて

11

Intellisense for C++/CLIは混乱し、誤検出エラーを報告することがよくあります。 C#用のIntellisenseほど良くありません。公平にするために、一般にC++コードはC#コードよりもインクリメンタルに解析する方がはるかに難しいです(ヘッダファイルに#defineプラグマを1つ追加すると、ヘッダファイルをインポートするファイルの構造はを完全にに変更する可能性があります)。私は偽のインテリセンスのエラーを見始めると、私は通常はエラー一覧]ウィンドウでそれらをオフに

  1. 右クリックし、[エラー一覧]ウィンドウの内容
  2. のチェックを外し、「表示インテリセンスエラー」
+1

私はそれをIntellidumbと呼びます。 –

+0

@NickBedford私は安心しています。ここではスカイネットのチャンスはない - 核ロケットが始まるとは思わないだろう;) – TomTom

1

あなたは常にC++で作業しているとインテリセンスのエラーに悩まされている場合、あなたは永久にこのエラー報告オフすることもできます。 ツール - >オプション - >テキストエディタ - > C/C++ - >詳細設定 - > IntelliSenceを - > Erroを無効にするrレポート

+0

それはあなたがすべきことです。ただそれを無効にする。どうもありがとう@マヌエル。 –

1

改行なしでファイルが終了した場合(例:インクルードファイルの最後の行は#endifであり、その後にCRLFはありません)、Intellisenseを混乱させ、エラーにフラグを立てます。

+0

私はそれが私の問題を解決したとは信じられない!ありがとう。 – AutomaticHourglass

関連する問題