Announcement

Collapse
No announcement yet.

Allocazione Spazio per Matrice Dynamica

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Allocazione Spazio per Matrice Dynamica

    PHP Code:
    /*
     *
     *  Matrice Dinamica / only space allocation
     *
     *
     */

    #include <st***.h>
    #include <stdlib.h>

     
    int main void){
        
        
    int **vet;
        
    unsigned int r,c;
        
    int i;
        
        
    printf("Numero righe\n");
        
    scanf("%u",&r);
        
    vet= (int**) malloc sizeof(int *));
        
    printf("Numero colonne\n");
        
    scanf("%u",&c);    
        
        for (
    i=0;i<r;i++){
            
            *(
    vet i) = ( int *) malloc sizeof(int));
        }
        
        return 
    0;
     } 
    | VFX Artist, C++ Programmer, HW Overclocker | Web: xgiovio.com Email: xgiovio@gmail.com Twitter: @xgiovio
Working...
X

Google Profile


My name is Giovanni Di Grezia, but people call me xgiovio.

Here is my homepage:.

I'm a VFX Artist and Software Developer.

Giovanni Di Grezia