Search:

Type: Posts; User: MKirstensen

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    2,740

    Thanks sorry for the edit...

    Thanks sorry for the edit...
  2. Replies
    10
    Views
    2,740

    So you mean that when i use buff in memset...

    So you mean that when i use buff in memset function for example, the compiler already looks at it as a pointer to the mem block, but when u uses the * it just points to the first section in the array?
  3. Replies
    13
    Views
    2,570

    In know, but cant find a damn thing on this...

    In know, but cant find a damn thing on this particular subject.... im sorry.
    Still bee nice if someone would answer me on what the consequences for a string without NULL is...

    To me its looks...
  4. Replies
    13
    Views
    2,570

    What happens without the NULL. Will it pickup...

    What happens without the NULL.
    Will it pickup data from memory until next NULL?

    And when i do the:

    str2[3] = "\0";

    Get: warning: assignment makes integer from pointer without a cast
  5. Replies
    13
    Views
    2,570

    Dont i need to add the NULL?

    Dont i need to add the NULL?
  6. Replies
    13
    Views
    2,570

    Take out chars in string

    Hello World!

    If now i want to take the 3 first chars in a string, to compare them to something else.
    How do i easiest only get those 3 chars of the string when i want to compare?
  7. Replies
    10
    Views
    2,740

    Thanks!

    Thanks!
  8. Replies
    10
    Views
    2,740

    There is something i dont get :confused: When...

    There is something i dont get :confused:

    When i call the function:


    nameOfFunction(str, sizeof(str));

    Why isnt there & in front of str, cause it seems logical to me that you passes the...
  9. Replies
    10
    Views
    2,740

    What is a static variabel? and whats is void?

    What is a static variabel? and whats is void?
  10. Replies
    10
    Views
    2,740

    Make function return string...

    Simple question: How can i make a function return a string?

    I have tried this:


    char "name of function"(Arguments) {
    char string1[16];
    string1 = "Hello World";
    return string1;
    }
  11. Replies
    3
    Views
    5,695

    Thanks alot...

    Thanks alot...
  12. Replies
    3
    Views
    5,695

    sin_zero[8]

    Hello World!

    In the sockaddr_in structure...



    struct sockaddr_in {
    short int sin_family;
    unsigned short int sin_port;
    struct in_addr ...
  13. Replies
    3
    Views
    2,389

    Thx...

    Thx...
  14. Replies
    3
    Views
    2,389

    inet_addr()

    Hello World!

    When i call inet_addr(string containing vaild ip address), i get back int back.
    Like:



    printf("%d\n", inet_addr("192.168.0.1"));

    /* The result is: 16820416 */
  15. Replies
    2
    Views
    1,169

    Ohhh yearh........ Sorry stupid question :)

    Ohhh yearh........ Sorry stupid question :)
  16. Replies
    2
    Views
    1,169

    Structure of a structure

    Hello World!


    Structure.member

    Okay here is the deal: i get that with this i statement i can reach the value "member" associated the single structure "structure". But when the statement looks...
  17. Replies
    22
    Views
    3,315

    Why is the result not 1?... :confused:

    Why is the result not 1?... :confused:
  18. Replies
    22
    Views
    3,315

    So i places the value of &my_addr in the struct...

    So i places the value of &my_addr in the struct sockaddr memory block.... right? and whats i the "*" good for? :confused:
  19. Replies
    22
    Views
    3,315

    I THINK i get it now, it makes &my_addr act like...

    I THINK i get it now, it makes &my_addr act like struct sockaddr * , but how can a memory address act like a structure ? :confused:
  20. Replies
    22
    Views
    3,315

    Thx alot! Elysia

    Thx alot! Elysia
  21. Replies
    22
    Views
    3,315

    So it takes the address of my_addr and place it...

    So it takes the address of my_addr and place it in the structure sockaddr... Am i right?
  22. Replies
    22
    Views
    3,315

    Struct help...

    Hello World!

    (struct sockaddr *)&my_addr

    What does this line do?... I am still trying to learn C :)
Results 1 to 22 of 22