Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
古いCタイプライブラリPVMの(intへのポインターではなく、intの配列)std::vector<int>* foo;として使用する必要があるとしましょう。int*私が懸念している限り、vector配列のようにメモリ内で要素が隣り合っているため、これは機能する可能性があります。試してみ(int*)fooましたが、どういうわけかデバッグできないエラーが発生したので、これが問題だと思います。アイデア、考え、エレガントな回避策はありますか?
std::vector<int>* foo;
int*
vector
(int*)foo