Click here to Skip to main content
15,909,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: To read a complete string Pin
Chandrasekharan P12-May-09 19:10
Chandrasekharan P12-May-09 19:10 
AnswerRe: To read a complete string Pin
Madhu Nair12-May-09 19:20
Madhu Nair12-May-09 19:20 
AnswerRe: To read a complete string Pin
«_Superman_»12-May-09 19:31
professional«_Superman_»12-May-09 19:31 
Your question is not clear.
Where are you reading from? File? Standard input?
How are you reading it? scanf? cin?

I'm assuming that you are reading from standard input, ie, user input.

If you are using scanf, you can do this -
char sz[1024];
scanf("%[^\n]", sz);

If you are using cin, you can do this -
string s;
getline(cin,s);


«_Superman
I love work. It gives me something to do between weekends.

GeneralRe: To read a complete string Pin
Pankaj D.Dubey12-May-09 19:50
Pankaj D.Dubey12-May-09 19:50 
GeneralRe: To read a complete string Pin
«_Superman_»12-May-09 20:03
professional«_Superman_»12-May-09 20:03 
GeneralRe: To read a complete string Pin
Pankaj D.Dubey12-May-09 20:16
Pankaj D.Dubey12-May-09 20:16 
GeneralRe: To read a complete string Pin
«_Superman_»12-May-09 21:05
professional«_Superman_»12-May-09 21:05 
GeneralRe: To read a complete string Pin
Madhu Nair12-May-09 21:14
Madhu Nair12-May-09 21:14 
GeneralRe: To read a complete string Pin
Pankaj D.Dubey12-May-09 21:28
Pankaj D.Dubey12-May-09 21:28 
GeneralRe: To read a complete string Pin
Chandrasekharan P12-May-09 21:54
Chandrasekharan P12-May-09 21:54 
GeneralRe: To read a complete string Pin
«_Superman_»12-May-09 21:55
professional«_Superman_»12-May-09 21:55 
GeneralRe: To read a complete string Pin
Rajesh R Subramanian12-May-09 22:39
professionalRajesh R Subramanian12-May-09 22:39 
GeneralRe: To read a complete string Pin
«_Superman_»12-May-09 22:49
professional«_Superman_»12-May-09 22:49 
GeneralRe: To read a complete string Pin
Pankaj D.Dubey12-May-09 22:40
Pankaj D.Dubey12-May-09 22:40 
GeneralRe: To read a complete string Pin
«_Superman_»12-May-09 22:56
professional«_Superman_»12-May-09 22:56 
GeneralRe: To read a complete string Pin
Pankaj D.Dubey12-May-09 23:04
Pankaj D.Dubey12-May-09 23:04 
QuestionCustomised Browse for folder dialog problem Pin
VC++Maniac12-May-09 18:47
VC++Maniac12-May-09 18:47 
QuestionCut and Drag and Drop File/Folder Path Pin
MsmVc12-May-09 18:19
MsmVc12-May-09 18:19 
AnswerRe: Cut and Drag and Drop File/Folder Path Pin
enhzflep12-May-09 19:46
enhzflep12-May-09 19:46 
GeneralRe: Cut and Drag and Drop File/Folder Path Pin
MsmVc12-May-09 21:06
MsmVc12-May-09 21:06 
GeneralRe: Cut and Drag and Drop File/Folder Path Pin
MsmVc12-May-09 21:53
MsmVc12-May-09 21:53 
GeneralRe: Cut and Drag and Drop File/Folder Path [LONG POST] Pin
enhzflep12-May-09 22:18
enhzflep12-May-09 22:18 
GeneralRe: Cut and Drag and Drop File/Folder Path [LONG POST] Pin
MsmVc12-May-09 22:22
MsmVc12-May-09 22:22 
QuestionRe: Cut and Drag and Drop File/Folder Path Pin
David Crow13-May-09 3:27
David Crow13-May-09 3:27 
QuestionWin32 web service client over SSL Pin
eight12-May-09 18:00
eight12-May-09 18:00 

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.