問題タブ [pointer-to-pointer]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
cuda - CUDA: cudaMallocHost(...); を使用したポインタからポインタへのメモリ割り当て
以下のコードに示すように、ホスト メモリを割り当てる方法を方法 1 から方法 2 に変更しました。コードはエラーなしでコンパイルおよび実行できます。方法2を使用してポインターからポインターにメモリを割り当てるのは適切な方法または副作用なのだろうか.
c - ファイルを double int ポインターに読み込む
ファイルを配列に読み込もうとしていますが、セグメンテーション違反が発生しています。メモリを正しく割り当てていないことがわかっています。ここで何が間違っていますか? read()
使用してwhile
ループすることが許可されています。
編集
2 つの部分に分割する前の完全な機能
ここでは、前の関数を 2 つの関数に分割しようとしています。これは、関数に必要なコードが 25 行未満であるためです。
私のメインで
c - Why this pointer to pointer to char is current?
In my opinion, the structure of first sentence is below diagram:
But the last sentence, whether this array equal array [0]? And ptr pointer to array[0],array[0] pointer to char? If that's right, How can I draw this diagram of structure ?
c - ダブルポインタをポインタ配列として使用するには?
バージョン 1:
バージョン 2:
私が正しければ、以下は8バイトだけを割り当てたいと思います(私のマシンのメモリポインタ用に4つと整数用に4つ)
次のことを行うにはどうすればよいですか?