Search:

Type: Posts; User: Rad_Turnip

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,157

    Awesome, cheers anon

    Awesome, cheers anon
  2. Replies
    5
    Views
    1,157

    Thanks Mats, I decided to go with adding the...

    Thanks Mats,

    I decided to go with adding the two together in a struct and returning that. However i am now struggling with the memory allocation of the struct i have created


    typedef struct...
  3. Replies
    5
    Views
    1,157

    Returning two structs from a function

    Hi there,

    I was just wondering if it was possible to return two structs of the same type from a function.

    i.e. if the case was struct ingedients, something like:

    return cake, biscuit;
    ...
  4. Replies
    1
    Views
    4,806

    An ADT as an array.

    Hey hey,

    I'm wanting to create an ADT that is an array (52 in size) of another ADT structure. The other ADT structure is a card and the array i am trying to create is the deck of cards. However...
  5. Replies
    6
    Views
    1,449

    Crazy, all those errors were attributed to the...

    Crazy, all those errors were attributed to the wrongly initialized array.

    Cheers Quzah

    -Nick
  6. Replies
    6
    Views
    1,449

    TextBuffer is meant to be a global array that i...

    TextBuffer is meant to be a global array that i can change from all the functions i write. I have written it up the same way as with other globals but this time i got errors.
  7. Hi thanks for the reply I'm not at my the...

    Hi

    thanks for the reply

    I'm not at my the computer with the code on it right now so i can't test my guess.

    I assume the problem is solved by passing the pointer *c instead of the char itself...
  8. Replies
    6
    Views
    1,449

    A buttload of errors

    I was trying to write myself a little c file to test scroll_str function. The setup for this one is basically the same as all the others i used in testing my code but this one gives a heap off...
  9. passing arg makes pointer to integer without a cast

    From the code below i get the following warning message from the display_char function.

    warning: passing arg 1 of 'valid char' makes pointer to integer without a cast


    void display_char(char...
  10. Replies
    2
    Views
    1,618

    *sigh* it is always a stupid mistake. Thanks a...

    *sigh* it is always a stupid mistake. Thanks a lot for your help.

    -Nick
  11. Replies
    2
    Views
    1,618

    More trouble passing arrays

    Hi,

    I have been trying to get my head around arrays, though i understood it but have tripped over again with multidimensional arrays.


    int main(int argc, char *argv[])
    {

    int...
  12. Replies
    7
    Views
    1,251

    Noted Cheers, -Nick

    Noted

    Cheers,
    -Nick
  13. Replies
    7
    Views
    1,251

    Thanks for your help guys. I wrote out a quick...

    Thanks for your help guys.

    I wrote out a quick program to test your advise before I attempted to implement it in my program.


    #include <stdio.h>
    #include <stdlib.h>

    void func1();
    int...
  14. Replies
    7
    Views
    1,251

    Cool, so the return statement in local_function2...

    Cool, so the return statement in local_function2 would be...


    return array;

    would this direct the "filled in" array back to local_function1?

    Thanks again Salem,
    -Nick
  15. Replies
    7
    Views
    1,251

    Confusion with passing Arrays

    Hey all,

    I am having trouble with getting an array from a local function, for a local function. So i have....


    int main(int argc, char *argv)
    { code }

    int local_function1()
    { ...
  16. Wicked Awesome Thanks, i had changed those for...

    Wicked Awesome

    Thanks, i had changed those for because it got rid of a segmentation fault a while back but forgot to right things again.

    Cheers Salem,
    -Nick
  17. I use the GNOME Terminal 2.7.3 in a Linux system...

    I use the GNOME Terminal 2.7.3 in a Linux system and compile using the command line gcc play.c -Wall -o play

    thanks to everyone for their input so far

    -Nick
  18. Thanks for your reply. Ok, that was a poorly...

    Thanks for your reply.

    Ok, that was a poorly thought out example. Maybe that isn't the problem.

    I tried to make an example because it'd take ages to explain what the entire purpose of this code...
  19. Getting the value of a variable rather than pointing to it. Need Help.

    Hey Hey,


    int i;
    int number[100];
    int placeHolder = 0;
    for(i = 0; i < 10; i++)
    {
    number[placeHolder] = i;
    placeHolder++;
  20. Replies
    4
    Views
    4,041

    Yay for Quzah :D Cheers man, -Nick

    Yay for Quzah :D

    Cheers man,
    -Nick
  21. Replies
    4
    Views
    4,041

    Thanks, that was just what i was looking for....

    Thanks, that was just what i was looking for. However i have now run into an all new problem that I am having trouble dealing with.


    #include <stdio.h>
    #include <stdlib.h>

    /* Prototypes of...
  22. Replies
    4
    Views
    4,041

    Need help using argc and argv.

    Hi fellow programmers ;)

    I have been trying to figure out how to use the argc and argv data. I have a main function that looks like


    int main(int argc, char *argv[])
    {
    int num_roads =...
  23. Replies
    4
    Views
    1,524

    Ok i get it now, have tested what the FAQ say on...

    Ok i get it now, have tested what the FAQ say on some really short code i made. Its the code that i was playing with (listed above) that is somehow wrong.

    -Nick
  24. Replies
    4
    Views
    1,524

    sigh, ok i still dont get it. This is a function...

    sigh, ok i still dont get it. This is a function to find the range of values in an array of integers...it is someone elses code that i am using to teach myself about arrays.


    #include <stdio.h>...
  25. Replies
    4
    Views
    1,524

    Cheers Quzah :D Had trouble searching up the...

    Cheers Quzah :D

    Had trouble searching up the problem with my limited knowledge of terminology.

    -Nick
Results 1 to 25 of 26
Page 1 of 2 1 2