Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: beezo
  • Order by date
  1. beezo

    2D array problem (pointers, malloc?)

    #define PI 3.141592654 #define WIREFRAME 1 typedef struct { float x, y, z; } VERTEX; VERTEX **points; float denom; int surface; void build_shape( float fi, float theta ) { float delta = PI / denom; points = (VERTEX**)malloc(sizeof(VERTEX)*(denom*2+1)); /* as in: VERTEX...
  2. beezo

    2D array problem (pointers, malloc?)

    you are right, that was just a typo. denom is a global variable, a float; scale is a mistake, scale is denom. PI is defined as mathematical PI. corrected version so far, below. what more can i say about this problem? basically, i have a 2D array points[ROW][COL], where size of ROW and COL =...
  3. beezo

    2D array problem (pointers, malloc?)

    I have a function that fills a 2D array with verticies but i want the 2D array to be declared outside the function, where the size is unknown. so the function only manipulates the array. I don't know what parameter to pass in, or how to declare the function. Can someone have a read, and tell me...

Part and Inventory Search

Back
Top