![]() |
|
#1
|
|||
|
|||
How to endl if a string reaches a "space"hey, this is a really dumb question, but i cant figure this out, lol
How do i endl if a user enters a string with a space in it. example: user enters: Jack Mc Jones output: Jack Mc Jones here is what i have so far: CPP / C++ / C Code:
|
|||
|
#2
|
|||
|
|||
Try thisTry this
Declare three strings and CIN them in this case u can COUT them any way you want! btw : if the strings are separated by commas each string will be CINned separately |
|
#3
|
|||
|
|||
Re: How to endl if a string reaches a "space"yes, but the problem is I dont know how much input the user is going the enter. for example:
Dell Computers Freakin Rock output: Dell Computers Freakin Rock see what i mean. The input could change all the time. |
|
#4
|
|||
|
|||
Re: How to endl if a string reaches a "space"Here is your code
CPP / C++ / C Code:
|
|
#5
|
|||
|
|||
Re: How to endl if a string reaches a "space"ah, finally, damnit i was close too. thanks for your help man.
|
|
#6
|
|||
|
|||
...:pis there a more helpful way to thank me
|
|
#7
|
|||
|
|||
Re: How to endl if a string reaches a "space"Off-topic:
CPP / C++ / C Code:
CPP / C++ / C Code:
|
|
#8
|
|||
|
|||
Re: Whoever sherif isQuote:
Just keep following the rules... I won't and still everything will work fine |
|
#9
|
||||
|
||||
Re: Whoever sherif isQuote:
IOW, there's no excuse for bad code unless all you want to be is a bad programmer. ![]() __________________
The 3 Laws of the Procrastination Society: 1) Never do today that which can be put off until tomorrow 2) Tomorrow never comes |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Message Class | TransformedBG | C++ Forum | 5 | 29-Nov-2006 21:28 |
| A Phonebook.cpp problem | redthestudent | C++ Forum | 27 | 23-Jul-2005 11:10 |
| operator overloading | Krandygrl00 | C++ Forum | 5 | 06-Jul-2005 17:01 |
| Help wit my source code compiler errors | Krandygrl00 | C++ Forum | 1 | 06-Jun-2005 08:14 |
| Reading and writing binary files in certain format | Dream86 | C++ Forum | 10 | 06-Aug-2004 10:38 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The