Search:

Type: Posts; User: hyaku_

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    2,018

    copy a string in the end of another string!?

    Hi!
    I have two strings:
    char str_1[] = "First String ";
    char str_2[] = "Second String";

    how do I copy the second string at the end of first string, so the result would be:
    "First String Second...
  2. my_arr[last_element] = null; ? I'll try that...

    my_arr[last_element] = null; ?


    I'll try that out right now!
  3. how to define string without null at the end!?

    Hi!
    I have a two string arrays, that I sent over the network, but the problem is that when I define them, GCC adds null at the end. I know it sopose to be like that, because it's string termination...
  4. Thank you both, that worked!: #include...

    Thank you both, that worked!:

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


    int main() {

    FILE *fd;
    fd = fopen("file", "r");
  5. Thanks! The problem is that I don't know the...

    Thanks!
    The problem is that I don't know the length of the second variable, so I won't be able to tell fscanf(); the length. Is it posible to just skip the second variable? for example:
    ...
  6. read text file, convert character numbers to int?

    Hi!
    I wrote a small code, that reads contents of the file and puts it into multidimensional array. This is the file:

    1:Name1:43
    2:Name2:84
    3:Name3:53
    4:Name4:14
    5:Name5:12
    6:Name6:63...
  7. Replies
    1
    Views
    2,161

    Passing function as an argument.

    Hi!
    There are two functions in my code:

    void *memcpy(void *dest, const void *src, size_t n);
    in_addr_t inet_addr(const char *cp);

    I want to set IP address to an 4 element array in structure:...
  8. Replies
    17
    Views
    9,974

    Thanks! No errors or warnings

    Thanks!

    No errors or warnings
  9. Replies
    17
    Views
    9,974

    Read/Write long integer to file!

    Hi!
    I have a very strange problem! When I save long integer to textfile, everything works well, but when I try to read it, I get completely different value.

    #include <stdlib.h>
    #include...
  10. Replies
    15
    Views
    23,685

    Sorry, my mistake! I fought Unix will have thous...

    Sorry, my mistake! I fought Unix will have thous functions as an system calls allso like in Linux!
  11. Replies
    15
    Views
    23,685

    Even on Beej's socket programming guide,...

    Even on Beej's socket programming guide, socket(); connect(); bind(); etc.. are called System Calls!
  12. Replies
    8
    Views
    1,980

    OK, this is the answer that I found: The second...

    OK, this is the answer that I found:
    The second argument is a pointer to a struct sockaddr, that contains information about your addresses, namely, port and IP address.
    But what is this?
    (struct...
  13. Replies
    15
    Views
    23,685

    Everything is compiled in executable file! And...

    Everything is compiled in executable file! And socket(); connect(); are system calls, aren't they? They are not functions of some libraries!
  14. Replies
    15
    Views
    23,685

    Its not about hating Windows! and so what, that I...

    Its not about hating Windows! and so what, that I am so stupid in programming? Allready searched all my posts? You just pointed that Unix isn't more powerfull than Windows! Do a little google search...
  15. Replies
    8
    Views
    1,980

    Thank you!

    Thank you!
  16. Replies
    15
    Views
    23,685

    By the way, there is a book called UNIX NETWORK...

    By the way, there is a book called UNIX NETWORK PROGRAMMING:
    http://www.amazon.com/exec/obidos/tg/detail/-/0139498761/qid=1106316964/sr=8-3/ref=pd_ka_1/102-3278784-0943319?v=glance&s=books&n=507846...
  17. Replies
    15
    Views
    23,685

    Are you stupid or what? Windows is crashing has...

    Are you stupid or what?
    Windows is crashing has buggy software, viruses, worms, trojans, big price, insecure.. and you call that a powerfull OS?

    *nix has only fiew viruses, software bugs are...
  18. Replies
    15
    Views
    23,685

    Why the hell do you want to do it with Winsock?...

    Why the hell do you want to do it with Winsock? For winsock you need to link some winsock dll and initialize it with code! And if that Win computer, where you run your app, wont have winsock*.dll you...
  19. Replies
    8
    Views
    1,980

    OK, can you at least tell me what is (struct...

    OK, can you at least tell me what is (struct sockaddr *)&server?
    Why does this line has both * and &? * is for pointer and & is when you create reference, but why are they both here?
  20. Replies
    8
    Views
    1,980

    Well, as far as I know it returns the size of an...

    Well, as far as I know it returns the size of an array! Am I right? Thank you!
  21. Replies
    8
    Views
    1,980

    Q. Socket function arguments!

    Hello!
    I know how to use connect, bind, accept, but I have no idea how they work!
    For example connect(); takes three arguments:

    int connect(int sockfd, const struct sockaddr *servaddr, socklen_t...
  22. Replies
    9
    Views
    2,810

    Thank you!!! This works: ...

    Thank you!!!
    This works:

    if(strncmp( &buffer[i], "l", 1) == 0){
    cout << "+\n";
    }

    But what does &buffer mean? Why do I need to use...
  23. Replies
    9
    Views
    2,810

    Client doesn't recognize '+'!

    Hello!
    I'm creating a simple pop3 client, but the problem is that my code doesn't recognize the '+' character! I don't get it! It should work!!!



    #include <sys/socket.h>
    #include...
  24. Parallel Port! Detect incoming current, posible?

    Hello!
    I have little knowledge about parallel port programming on Linux. I wan't to know if its possible to like 'listen' if the current is incoming into data pin? What I need is forexample I have...
  25. Replies
    15
    Views
    11,231

    Thanks! I allready printed them out, but last...

    Thanks!
    I allready printed them out, but last two bytes are blank. But when I print the whole text out with loop like this:


    int recv_data_size = recv(...);
    for(int q=0; q<recv_data_size; q++){...
Results 1 to 25 of 30
Page 1 of 2 1 2