![]() |
| | #1 |
| Registered User Join Date: Dec 2001
Posts: 479
| get rid of rest 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. |
| pode is offline | |
| | #2 | |
| Carnivore ('-'v) Join Date: May 2002
Posts: 2,866
| Quote:
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. | |
| Hunter2 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get rid of warning: the use of `tmpnam' is dangerous, better use `mkstemp' | t0bias | C++ Programming | 5 | 12-17-2007 03:24 AM |
| Getting rid of the four shortcuts on the left side of the Save/Open Dialog Box | Queatrix | Windows Programming | 19 | 09-17-2005 09:49 AM |
| How to get rid of MDI window | bennyandthejets | Windows Programming | 4 | 05-11-2004 08:49 PM |
| getting rid of the unsightly "^M" character | EvBladeRunnervE | Tech Board | 3 | 03-17-2004 08:54 PM |
| getting rid of grub | axon | Tech Board | 3 | 03-17-2004 07:15 PM |