我是C和C++的新手,我只使用Java語言中的數組和多維數組。 我試圖移植一些代碼,我需要知道這些行的意思是:這些代碼行是做什麼的?它涉及指針和數組
int rows = 100;
int columns = 10;
int i,j;
double *example = new double[rows*columns];
File fileEx = fopen("exampleText.txt","r");
for(i=0;i<rows;i++)
for(j=0;j<columns;j++){
fscanf(fileEx, "%lf", example+columns*i+j);
//printf("%f ", *(example+columns*i+j));
}
非常感謝...幫助感激!
哪條線,具體來說,你不明白? – 2011-12-26 20:46:07
如果我是你,我會在C上得到一本好書。 – 2011-12-26 20:46:50