Search:

Type: Posts; User: Twiggy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: comments

    by Twiggy
    Replies
    32
    Views
    4,708

    I always use // instead of /* */ comments just...

    I always use // instead of /* */ comments just because I find it looks better. Although it is a pain to have to take out twenty //'s when you would have just had to take out the /* */'s. :P
  2. Replies
    6
    Views
    2,756

    This is how I would do it. Set a max for your...

    This is how I would do it.

    Set a max for your array.



    #define MAX_SEATS 10

    for (i = 0, i < MAX_SEATS, i++)
    {
  3. Replies
    5
    Views
    1,763

    code: printf("wang\n"); printf("wang\n"); ...

    code:
    printf("wang\n");
    printf("wang\n");



    and...

    code:
    printf("wang\n"
  4. Thread: strcmp

    by Twiggy
    Replies
    7
    Views
    1,969

    Am I the only one in doing strings that always...

    Am I the only one in doing strings that always puts them as caps? I always toupper everything thats inputted by the user. Maybe its bad programming on my end. :P
  5. Replies
    16
    Views
    7,606

    I've always wondered this. Still learning C...

    I've always wondered this. Still learning C myself. What exactly does this do?



    const char* GetDigit(char DigitCharacter)
    {
    return DigitString[DigitCharacter - 48];
    }
  6. Replies
    5
    Views
    1,642

    I always just add a getch(); at the end and tell...

    I always just add a getch(); at the end and tell them to hit any button to end the program. Crude, but it works fine for me. :)
  7. Thread: At a loss

    by Twiggy
    Replies
    5
    Views
    1,273

    Can you just send text? ie send(sockfd, "yes",...

    Can you just send text? ie send(sockfd, "yes", sizeof(buf), 0 );

    Also how do you send an enter key? just \r ?
  8. Thread: At a loss

    by Twiggy
    Replies
    5
    Views
    1,273

    This is what I use to send to the socket. ...

    This is what I use to send to the socket.



    void write_to_socket(char * buf)
    {
    send(sockfd, buf, strlen(buf),0);
    return;
    }
  9. Thread: At a loss

    by Twiggy
    Replies
    5
    Views
    1,273

    Actually. I was just using this because someone I...

    Actually. I was just using this because someone I knew already had a library. However since it doesn't work for me. I'm going back and redoing all the functions one at a time. Right now i've gotten...
  10. Thread: At a loss

    by Twiggy
    Replies
    5
    Views
    1,273

    Right on. I hadn't though of using netstat. I'm...

    Right on. I hadn't though of using netstat. I'm getting connected fine I know that. I've got checks for that. I just can't recieve anything other then a whole load of [[[[[[[[[['s I was just thinking...
  11. Thread: At a loss

    by Twiggy
    Replies
    5
    Views
    1,273

    At a loss

    I've been plugging away with my sockets. I've set up tests, and read nothing. I've come to the conclusion something must be wrong when I start opening the sockets. As I've downloaded other example...
  12. Replies
    0
    Views
    1,592

    Odd socket trouble

    I added a printf to see if I was getting from the socket. It just came across with a bunch of @@@@@ which leds me to believe that i'm not reading from the socket right.

    I'm using visual c++. This...
  13. Thread: Sockets

    by Twiggy
    Replies
    8
    Views
    2,480

    Oh, and my tcp.h just for giggles. ...

    Oh, and my tcp.h just for giggles.




    #define DNS_FAILURE -1
    #define SOCKET_FAILURE -2
    #define CONNECT_FAILURE -3

    int init_winsock(void);
  14. Thread: Sockets

    by Twiggy
    Replies
    8
    Views
    2,480

    What I posted earlier was my tcp.cpp which...

    What I posted earlier was my tcp.cpp which compiles fine in VC. However this doesn't.

    The error i'm getting;
    --------------------Configuration: autoroller - Win32 Debug--------------------...
  15. Thread: Sockets

    by Twiggy
    Replies
    8
    Views
    2,480

    Actually I figured it out. I'm trying to use...

    Actually I figured it out. I'm trying to use DJGPP to compile, but someone pointed out to me that DJGPP just makes dos programs. So I'm getting Visual C++ 6, and hoping that will work. I'm assuming I...
  16. Thread: Sockets

    by Twiggy
    Replies
    8
    Views
    2,480

    Sockets

    I've tried using Dsock. It would work if I could make Turbo C++ work. However what i'm using is DJGPP. Are there any socket libraries for DJGPP out there? I tried to search for some via google, but...
  17. Thread: String question

    by Twiggy
    Replies
    2
    Views
    919

    My apologies. I was just giving an example of...

    My apologies. I was just giving an example of what I had to give you an idea of what I was trying to do.

    I want to take this.

    Strength: 15 Intelligence: 12 Wisdom: 16 Dexterity: 16...
  18. Thread: String question

    by Twiggy
    Replies
    2
    Views
    919

    Maybe i'm just dense, but I don't quite follow. I...

    Maybe i'm just dense, but I don't quite follow. I thought there was a thing in strings to count over a certain number. Since the chars over to the stat isn't going to change. That would be the...
  19. Thread: String question

    by Twiggy
    Replies
    2
    Views
    919

    String question

    I've gotten everything all sorted out for my little program. I followed the link to Dsock found here aswell to get Dsock.h for handling my sockets. Now I just need to figure out how to search this...
  20. Replies
    11
    Views
    1,235

    Give me a demonstration? I learn better by...

    Give me a demonstration? I learn better by example. Using goto is the only way I know how to return something to where I want it to be. Also what is the big no no associated with using goto?
  21. Replies
    11
    Views
    1,235

    I'm using goto incase the string entered wasn't...

    I'm using goto incase the string entered wasn't what i wanted, so i can return it to the beginning of the function.

    I've also got a way of writing this all to the socket. This is going to be a...
  22. Replies
    11
    Views
    1,235

    Tables, and calling/referencing against them

    I'm currently making a program for a mud. It takes strings entered by the user and saves them in a file. Once that is finished it connects to the mud, and sends the strings out creating the...
  23. Replies
    20
    Views
    3,513

    www.textpad.com I use textpad and wouldn't use...

    www.textpad.com I use textpad and wouldn't use anything else. :)
  24. Replies
    10
    Views
    1,299

    Kiss your ass? Why don't you bite me. Your about...

    Kiss your ass? Why don't you bite me. Your about the only idiot in these boards who actually has that kind of attitude. I've found everyone here quite helpful and kind. If your that deranged and have...
  25. Replies
    10
    Views
    1,299

    I agree with him. It all falls back under the...

    I agree with him. It all falls back under the rule, if you don't have anything good to say. Don't say anything at all. I for one don't need to read your sarcasm.
Results 1 to 25 of 43
Page 1 of 2 1 2