Search:

Type: Posts; User: Cpgm

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    915

    Please help!!! array size

    Hello,

    Can someone tell me why do I get 16 instead of the full size of row * col * int?
    (If I did int *iptr[4][7]; however, I would get (4*7*4) = 112 and not 16)



    int *iptr[4]; // array of...
  2. Replies
    11
    Views
    5,177

    Andrew, good points and thanks for the reminder...

    Andrew, good points and thanks for the reminder on releasing memory after use. Though the malloc method requires 2 steps it allows for better management of memory/resource and code running better. At...
  3. Replies
    11
    Views
    5,177

    Salem thanks a lot for your help!!! So in...

    Salem thanks a lot for your help!!!

    So in summary, I not only need to allocate memory for the array of structures but also the members within the structure. And since these members were not...
  4. Replies
    11
    Views
    5,177

    OK, I created pointer of an array of structure of...

    OK, I created pointer of an array of structure of size 10; initialize it but when i print it is is only printing the last element for two of the members (sigName and rfConn). Can someone tell me what...
  5. Replies
    11
    Views
    5,177

    Ok, I did some more research and was able to...

    Ok, I did some more research and was able to figure out what I need to do for what my I was trying to do:

    1) needed a pointer pointing to an array of several string elements (e.g. 10)
    2)...
  6. Try with these fixes, Note that each off these...

    Try with these fixes,
    Note that each off these assignment should each be on separate line
    c = 3, h = 7, n = 1, o = 2, weight = 89.0929;



    #include <stdio.h>
    int main( ) {
    int c=3, h=7,...
  7. Replies
    11
    Views
    5,177

    Sorry about it not being clear. max = 10...

    Sorry about it not being clear. max = 10 (declared at top of program: malloc)

    I have reduced the program and make it easier to read/follow. I have also added comment to where the error occurs: see...
  8. Replies
    11
    Views
    5,177

    HELP PLS!!! pointer string array run-time error

    Hello, I am getting an error when I run the following code: the error occurs in function printArryIIS when attempting to pring content of arrays, string pointer array to be specific:

    Error msg:...
  9. Replies
    3
    Views
    2,189

    Salem, thx for your response. So are you saying...

    Salem, thx for your response.
    So are you saying I cannot use a char pointer as a member inside a structure (i.e. it would have to be a string...like char name[10] instead of char* name)?
  10. Replies
    3
    Views
    2,189

    pointer to array of structure

    Hello, I am not sure why I am not able to print member structure member aa. Can someone please help? Code and output below:



    #include <ansi_c.h>
    // Structuer passing example

    typedef struct...
Results 1 to 10 of 10