Click here to Skip to main content
15,793,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHaving issues with the cin.getline() function in C++ Pin
Member 147670008-Mar-20 15:29
Member 147670008-Mar-20 15:29 
AnswerRe: Having issues with the cin.getline() function in C++ Pin
k50548-Mar-20 16:37
mvek50548-Mar-20 16:37 
GeneralRe: Having issues with the cin.getline() function in C++ Pin
Member 147670009-Mar-20 11:55
Member 147670009-Mar-20 11:55 
GeneralRe: Having issues with the cin.getline() function in C++ Pin
Member 147670009-Mar-20 12:01
Member 147670009-Mar-20 12:01 
GeneralRe: Having issues with the cin.getline() function in C++ Pin
k50549-Mar-20 13:12
mvek50549-Mar-20 13:12 
GeneralRe: Having issues with the cin.getline() function in C++ Pin
Member 1476700010-Mar-20 9:49
Member 1476700010-Mar-20 9:49 
GeneralRe: Having issues with the cin.getline() function in C++ Pin
k505410-Mar-20 10:04
mvek505410-Mar-20 10:04 
AnswerRe: Having issues with the cin.getline() function in C++ Pin
Stefan_Lang8-Mar-20 23:26
Stefan_Lang8-Mar-20 23:26 
k5054 already said it all.

But I'd like to add the general advice that you read up on the description of all I/O functions rather than making assumptions about what they return. Especially input functions.

Also, it is usually easier to read std::string objects rather than reading input of unknown length into limited size buffers. You can use the function getline(istream&, string) for that. See getline (string) - C++ Reference[^]
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: Having issues with the cin.getline() function in C++ Pin
k50549-Mar-20 13:29
mvek50549-Mar-20 13:29 
GeneralRe: Having issues with the cin.getline() function in C++ Pin
Stefan_Lang9-Mar-20 22:41
Stefan_Lang9-Mar-20 22:41 
Generala not fun question: how to deploy a utility program written in MFC and C++ Pin
Southmountain8-Mar-20 13:56
Southmountain8-Mar-20 13:56 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Jon McKee8-Mar-20 14:01
professionalJon McKee8-Mar-20 14:01 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Southmountain8-Mar-20 17:06
Southmountain8-Mar-20 17:06 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Maximilien8-Mar-20 16:38
Maximilien8-Mar-20 16:38 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Southmountain8-Mar-20 17:03
Southmountain8-Mar-20 17:03 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Shao Voon Wong8-Mar-20 16:51
mvaShao Voon Wong8-Mar-20 16:51 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Southmountain8-Mar-20 17:04
Southmountain8-Mar-20 17:04 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Shao Voon Wong8-Mar-20 17:09
mvaShao Voon Wong8-Mar-20 17:09 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Southmountain8-Mar-20 17:24
Southmountain8-Mar-20 17:24 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Shao Voon Wong8-Mar-20 17:28
mvaShao Voon Wong8-Mar-20 17:28 
GeneralRe: a not fun question: how to deploy a utility program written in MFC and C++ Pin
Southmountain8-Mar-20 17:08
Southmountain8-Mar-20 17:08 
QuestionTrying to add a menu bar to a dialog Pin
ForNow29-Feb-20 17:07
ForNow29-Feb-20 17:07 
AnswerRe: Trying to add a menu bar to a dialog Pin
Richard MacCutchan29-Feb-20 22:11
mveRichard MacCutchan29-Feb-20 22:11 
GeneralRe: Trying to add a menu bar to a dialog Pin
ForNow1-Mar-20 12:55
ForNow1-Mar-20 12:55 
GeneralRe: Trying to add a menu bar to a dialog Pin
Richard MacCutchan1-Mar-20 22:25
mveRichard MacCutchan1-Mar-20 22:25 

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.