C/C++の宿題を片付けます 102代目
■ このスレッドは過去ログ倉庫に格納されています
0184デフォルトの名無しさん
2008/01/07(月) 15:34:52#include <stdio.h>
#include <stdlib.h>
struct point{
double x;
double y;
};
int main()
{
struct point *cdl,*tmp;
int i, n;
printf("データの数は?: ");
scanf("%d", &n);
if((cdl = (struct point *)malloc(n * sizeof(struct point))) == NULL){
printf("メモリ確保に失敗しました。終了します。\n");
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています