Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Height Pin
Rafael Fernández López28-Dec-03 13:45
Rafael Fernández López28-Dec-03 13:45 
Generalinstalling OpenCV library Pin
Anonymous28-Dec-03 3:11
Anonymous28-Dec-03 3:11 
Generalgenerating .obj files out of header files Pin
tguzella28-Dec-03 1:12
tguzella28-Dec-03 1:12 
GeneralRe: generating .obj files out of header files Pin
Gary R. Wheeler28-Dec-03 2:44
Gary R. Wheeler28-Dec-03 2:44 
QuestionHow to differentiate between 2 Slider Controls ?? Pin
elza28-Dec-03 0:06
elza28-Dec-03 0:06 
AnswerRe: How to differentiate between 2 Slider Controls ?? Pin
LunaticFringe28-Dec-03 0:29
LunaticFringe28-Dec-03 0:29 
GeneralRe: How to differentiate between 2 Slider Controls ?? Pin
elza28-Dec-03 1:11
elza28-Dec-03 1:11 
Generalgetline(cin, s); issues Pin
RanBlade27-Dec-03 23:06
RanBlade27-Dec-03 23:06 
I have googled for the last hour and havent found anyhting worth not(most likely because Iam not searching the right terms). Anyway getling(cin, s) is the only way I know of to get a multiple word string pulled together and that will output as it went in. But the problem is you have to hit the enter key twice in order for the program to move on. is there a better way of going about getting a sentence or string of words in one input or is there some kind of function I can use to make it so the person dosent have to hit enter twice? here is the little sample program i have been working with to try and figure this out.

<code>
#include <iostream>
#include <string>

int main()
{
std::string test, test1;

std::cout << "Enter something: ";
std::getling(std::cin, test);
std::cin.ignore(100, '\n'); // with or without this i have to hit enter twice
// this just makes it possible to display another string..

std::cout << test << std::endl;

std::cout << "Enter again: ";
std::getling(std::cin, test1);

std::cout << test1 << std::endl;
return 0;
}
</code>

I know this probably isnt the best code for many reasons but Iam just trying to figure out how to make it possible to enter a multi word string. any help would be great as Iam finnally stuck and cant get any furthur on my own.

RanBlade
aka Eric Ranaldi
"Passion is what drive you to stay until 4am ficing that minor bug that hardly anyone would notice...Passion is where great games come from. If you don'l live and breath games, you shouldn't be in the gaming industry" - Dave Pottinger, Ensemble Studios
QuestionCan I use multi-dialog in one form view? Pin
Vistac27-Dec-03 22:27
Vistac27-Dec-03 22:27 
AnswerRe: Can I use multi-dialog in one form view? Pin
Monty228-Dec-03 20:52
Monty228-Dec-03 20:52 
GeneralRe: Can I use multi-dialog in one form view? Pin
Vistac28-Dec-03 22:46
Vistac28-Dec-03 22:46 
GeneralRe: Can I use multi-dialog in one form view? Pin
Monty228-Dec-03 22:59
Monty228-Dec-03 22:59 
GeneralRe: Can I use multi-dialog in one form view? Pin
Vistac29-Dec-03 0:17
Vistac29-Dec-03 0:17 
GeneralRe: Can I use multi-dialog in one form view? Pin
Monty229-Dec-03 0:55
Monty229-Dec-03 0:55 
QuestionHow to set richedit background image? Pin
okboy27-Dec-03 19:24
okboy27-Dec-03 19:24 
AnswerRe: How to set richedit background image? Pin
Monty228-Dec-03 20:54
Monty228-Dec-03 20:54 
GeneralPrinter Spooler Pin
auur27-Dec-03 19:15
auur27-Dec-03 19:15 
QuestionTo Unicode or not to Unicode? Pin
Prakash Nadar27-Dec-03 18:50
Prakash Nadar27-Dec-03 18:50 
AnswerRe: To Unicode or not to Unicode? Pin
Gary R. Wheeler28-Dec-03 6:56
Gary R. Wheeler28-Dec-03 6:56 
GeneralRe: To Unicode or not to Unicode? Pin
Prakash Nadar28-Dec-03 16:31
Prakash Nadar28-Dec-03 16:31 
GeneralProblem with my EXE.....(help me if you can) Pin
DarioKun27-Dec-03 16:02
DarioKun27-Dec-03 16:02 
QuestionHow to zoom in Graph Pin
siew hoon27-Dec-03 15:13
siew hoon27-Dec-03 15:13 
AnswerRe: How to zoom in Graph Pin
LunaticFringe28-Dec-03 1:17
LunaticFringe28-Dec-03 1:17 
Generalafx_message Pin
briefcase27-Dec-03 13:49
briefcase27-Dec-03 13:49 
GeneralRe: afx_message Pin
PJ Arends28-Dec-03 16:41
professionalPJ Arends28-Dec-03 16:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.