gcc 4.4をgCC 4.7にアップデートしていますが、これは4.7を使用するために行います。unique_ptrにはメンバー関数がありません
私の問題はunique_ptr
を使用している場合です。私はこのコード
#include <iostream>
#include <memory>
#include <CL/cl.h>
using namespace std;
/*
*
*/
int main(int argc, char** argv) {
std::unique_ptr<cl_platform_id[]>yt;
yt = std::unique_ptr<icl_platform_id[]> (new cl_platform_id [3]);
/* yt.get()[0] = ...... */ this is error no member found
return 0;
}
を書いたが、私はuique_ptr::get()
ようyt
メンバーなど使用したいと私が得る唯一の機能はoperator*
なので、問題は何ですか?
編集:あなたのIDEのメンバーの提案に問題があるでしょう
std::unique_ptr<cl_platform_id[]> yt (new cl_platform_id[3]);
yt[0].some_member();
エラーメッセージは何ですか? – Nick
私はgcc 4.7を使っていて、getに問題はありません。 CLを使わずに問題を再現する小さなサンプルを提供できますか? – juanchopanza
エラーメッセージは表示されませんが、operator *メンバー以外のメンバーのメンバーは見つかりません。 – user1344201