Search:

Type: Posts; User: hellogamesmaste

Search: Search took 0.01 seconds.

  1. Ok I have some things to think about, thanks for...

    Ok I have some things to think about, thanks for the replies.

    I've started using gdb to debug, I've never done it before and it's very interesting.
  2. Strange characters in output to terminal

    I have a text file with ManchesterUtd01Reading, I open it for reading, count the number of characters on the first line and use it in a loop, the loop will insert a single character in an array...
  3. Replies
    4
    Views
    2,271

    lol oops

    lol oops
  4. Replies
    4
    Views
    2,271

    File input with fgets

    Dealing with files seems pretty awkward and complicated to me and also inconsistent in the results.

    With the following code:

    #include <stdio.h>
    #include <string.h>



    int main()
  5. Replies
    10
    Views
    2,910

    With your incorrect code above is it trying to...

    With your incorrect code above is it trying to store an int value as a pointer address? So instead of pointing to a memory address location, it's trying to point to a integer as a memory address...
  6. Replies
    10
    Views
    2,910

    Ah I thought so. One thing I don't get with my...

    Ah I thought so.

    One thing I don't get with my program here is newNode->strname,name), in that usually you do *name to get the value of what the pointer points at.

    So usually you do:
    int a;...
  7. Replies
    10
    Views
    2,910

    Lol I could have just done...

    Lol I could have just done strcpy(newNode->strname,name); and that is it.

    In a tutorial they use strcopy, is that a typo on strcpy or something else?
  8. Replies
    10
    Views
    2,910

    I got it working finally. I remembered that when...

    I got it working finally. I remembered that when you pass an address to an array it only looks at array 0, so you have to step through it using a loop to read and write each character.


    int i;...
  9. Replies
    10
    Views
    2,910

    Problem with strings in Linked List

    I read a 26 page explanation online about linked lists from Stanford university, actually I read it about 100 times and I understood it in the end.

    So I copied the code and got it working fine....
  10. Replies
    3
    Views
    1,646

    Dealing with MySQL in C

    I'm just learning the basics of C at the moment, currently trying to understand linked lists and programming one, then I'll move on to file input/output after a while.

    I just wonder if it is ok...
  11. Replies
    2
    Views
    1,690

    What is system programming?

    I am learning C as a hobby and it looks like the goal of beginner tutorials is to create simple applications, which is fine to understand how the language works.

    However, C is supposedly mainly...
  12. Ahh thank you. That has made it clearer. I just...

    Ahh thank you. That has made it clearer. I just hope it sticks :)
  13. I ask because my program didn't work and I didn't...

    I ask because my program didn't work and I didn't know why.

    In [1] I had:


    int qcheck(int , int *p);

    in [3] I had:
  14. Explanation of arguments/parameters in Functions

    I am not 100% sure about functions at the moment.

    [1] Declare function above main.


    int qcheck(int holdans, int *p);


    [2] Call function:
  15. Ah simple. Thank you.

    Ah simple. Thank you.
  16. undefined reference to function names

    Ok I've already spent hours agonising of why my program didn't work and it turned out Switch should have been switch, but the error message "should have ; before {" was not very helpful.

    Anyway...
  17. Is it true then, that whenever your pointer...

    Is it true then, that whenever your pointer points to a structure address, it does not point to all the components, so you have to use & for age as if it was just a normal variable? otherwise if you...
  18. Pointer to Structure error explanation

    I have modified some tutorial code to get input from the keyboard, and then call a function with a pointer to a structure as input.

    I have got it working but I don't understand why the first time...
  19. Replies
    1
    Views
    702

    Strings in arrays

    I'm just starting out and have an idea in mind to create a quiz program, not sure how to implement it yet because I don't understand how it would work. Also not sure if I'd have to use structures...
  20. So what is the proper way to do 10/3 to get a...

    So what is the proper way to do 10/3 to get a decimal result?

    Is it to store 10 and 3 as floats or is it to use the casting method: a = (float) 10/3?

    C - The float and double Data Types and the...
  21. Question about data types and basic arithmatic

    Hi,

    Why can you put integer values into a float variable and there is no error? maybe I am confused about float ranges but I thought it only contained decimals.

    I had two integers, 10 and 3,...
Results 1 to 21 of 21