Search:

Type: Posts; User: traxy

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,412

    I know its not assigning a value to x and y...

    I know its not assigning a value to x and y because after I try to assign a value I use this code to print the value pointed to by x and y but it just prints 0.00000 0.00000




    printf("Value of...
  2. Replies
    5
    Views
    1,412

    Yes, that is my problem its not assigning a value...

    Yes, that is my problem its not assigning a value to x or y when I try this

    x = data_ptr[0].x;
    y = data_ptr[0].y;


    but I know the value of data_ptr[0].x; is an address in memory, I have...
  3. Replies
    5
    Views
    1,412

    Pointer to stucture?

    Hey,

    Here is a sample of code I will be refering to:



    #include <stdio.h>
    #include "misc.h"

    int main(void){
  4. Replies
    9
    Views
    12,622

    thanks heaps for your help. looks like I had...

    thanks heaps for your help.

    looks like I had to use although i would have though that * would take precedence over +


    (*(data_ptr+count)).member1 = numLines;
    ...
  5. Replies
    9
    Views
    12,622

    I have made the suggested modifications. I am...

    I have made the suggested modifications. I am still having some trouble compiling this program to test the getdata function.

    Here is the main function


    #include <stdio.h>
    #include "misc.h"
    ...
  6. Replies
    9
    Views
    12,622

    I have done some more testing and managed to get...

    I have done some more testing and managed to get it working. This is what I did, please let me know if my logic is correct.

    Im main I created a char pointer:



    char file, *filename;
    filename...
  7. Replies
    9
    Views
    12,622

    using fopen with const char array?

    Hey,

    I'm currently working on a C programming assignment but am stuck. I need to prompt a user to enter a filename then I must pass that filename to a function(getdata) and have the getdata...
  8. Replies
    2
    Views
    1,140

    new to pointers having problems

    Here is what I am trying to do, I have my die array with some test data then I try to pass the array to function menuDice but get an error "can not convert int to int for argument 3" I get this same...
Results 1 to 8 of 8