get rid of rest

This is a discussion on get rid of rest within the Networking/Device Communication forums, part of the General Programming Boards category; hi im making a small chat program, im sending a string that the user tyes in but i want to ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    479

    get rid of rest

    hi
    im making a small chat program, im sending a string
    that the user tyes in but i want to get rid of the rest that
    is stored in the string after the user has typed in his message
    so only the string that the user typed will be sent i think its some cin funktion but i dont remember it.

  2. #2
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    I'm making a small chat program. I'm sending a string
    that the user tyes in, but I want to get rid of the rest that
    is stored in the string after the user has typed in his message,
    so that only the string that the user has typed will be sent. I think it's some cin function, but I dont remember it.
    Grammar, punctuation, spelling, etc. corrected by Hunter2.

    char buf[MAX_STRING_SIZE]
    cin.getline(buf, MAX_STRING_SIZE)

    send() only what you want to send. See parameter #3, len, on MSDN.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 12-17-2007, 02:24 AM
  2. Replies: 19
    Last Post: 09-17-2005, 09:49 AM
  3. How to get rid of MDI window
    By bennyandthejets in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:49 PM
  4. getting rid of the unsightly "^M" character
    By EvBladeRunnervE in forum Tech Board
    Replies: 3
    Last Post: 03-17-2004, 07:54 PM
  5. getting rid of grub
    By axon in forum Tech Board
    Replies: 3
    Last Post: 03-17-2004, 06:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21