peterzig

wskazniki

Nov 24th, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. // ConsoleApplication8.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <conio.h>
  6. #include <malloc.h>
  7.  
  8. int main()
  9. {
  10.     float **adr;
  11.     int i, lw_i,lk_i;
  12.     adr = (float **)calloc(lw_i, sizeof(float*));
  13.     for (i = 0; i < lw_i; ++i);
  14.     *(adr + i) = (float*)calloc(lk_i, sizeof(float));
  15.     *(*(adr + 0) + 1) = 3.14; // adr [0][1] = 3.14
  16.     for (i = 0; i < lw_i; ++i)
  17.         free(*(adr + i));
  18.     free(adr);
  19.     _getch();
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment