Click here to Skip to main content
15,921,577 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
_AnsHUMAN_ 19-Apr-11 2:50
_AnsHUMAN_ 19-Apr-11 2:50 
QuestionRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
David Crow19-Apr-11 7:15
David Crow19-Apr-11 7:15 
AnswerRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
Mattias G21-Apr-11 12:07
Mattias G21-Apr-11 12:07 
QuestionMinimizing Windows Pin
john563219-Apr-11 2:34
john563219-Apr-11 2:34 
AnswerRe: Minimizing Windows Pin
Hans Dietrich19-Apr-11 3:32
mentorHans Dietrich19-Apr-11 3:32 
GeneralRe: Minimizing Windows Pin
nitin319-Apr-11 6:03
nitin319-Apr-11 6:03 
GeneralRe: Minimizing Windows Pin
john563219-Apr-11 19:16
john563219-Apr-11 19:16 
QuestionRe: Minimizing Windows Pin
David Crow19-Apr-11 7:19
David Crow19-Apr-11 7:19 
AnswerRe: Minimizing Windows Pin
Jose David Pujo20-Apr-11 1:29
Jose David Pujo20-Apr-11 1:29 
Questiongetting port no to whcih cthe systems r connected Pin
svknair19-Apr-11 2:24
svknair19-Apr-11 2:24 
AnswerRe: getting port no to whcih cthe systems r connected Pin
Hans Dietrich19-Apr-11 3:35
mentorHans Dietrich19-Apr-11 3:35 
QuestionError:: sprintf' : cannot convert parameter 1 from 'TCHAR [128]' to 'char *' in Unicode Build Pin
Le@rner19-Apr-11 2:13
Le@rner19-Apr-11 2:13 
AnswerRe: Error:: sprintf' : cannot convert parameter 1 from 'TCHAR [128]' to 'char *' in Unicode Build Pin
_AnsHUMAN_ 19-Apr-11 2:24
_AnsHUMAN_ 19-Apr-11 2:24 
AnswerRe: Error:: sprintf' : cannot convert parameter 1 from 'TCHAR [128]' to 'char *' in Unicode Build Pin
వేంకటనారాయణ(venkatmakam)19-Apr-11 2:29
వేంకటనారాయణ(venkatmakam)19-Apr-11 2:29 
GeneralRe: Error:: sprintf' : cannot convert parameter 1 from 'TCHAR [128]' to 'char *' in Unicode Build Pin
Le@rner19-Apr-11 22:19
Le@rner19-Apr-11 22:19 
Questionmanipulare stdin Pin
baerten18-Apr-11 23:04
baerten18-Apr-11 23:04 
AnswerRe: manipulare stdin Pin
rahul.kulshreshtha19-Apr-11 0:22
rahul.kulshreshtha19-Apr-11 0:22 
GeneralRe: manipulare stdin Pin
baerten20-Apr-11 20:39
baerten20-Apr-11 20:39 
AnswerRe: manipulare stdin Pin
Niklas L19-Apr-11 1:27
Niklas L19-Apr-11 1:27 
As already stated, you cannot write to the read-only stdin stream. (Check the return code of fscanf.) You could try the following:
std::stringbuf buffer;
std::iostream stream(&buffer);

You can both read and write to that stream. You can have one thread collecting data from stdin, and one thread to collect data from elsewhere.

This stream will not be threadsafe however, so you have to add locks to read and write access. I suppose you can do something similar in C if C++ is not your choice.

GeneralRe: manipulare stdin Pin
baerten20-Apr-11 20:41
baerten20-Apr-11 20:41 
Question*objectName Vs objectName-> Pin
rahul.kulshreshtha18-Apr-11 21:33
rahul.kulshreshtha18-Apr-11 21:33 
AnswerRe: *objectName Vs objectName-> Pin
Niklas L18-Apr-11 21:58
Niklas L18-Apr-11 21:58 
GeneralRe: *objectName Vs objectName-> Pin
rahul.kulshreshtha18-Apr-11 22:21
rahul.kulshreshtha18-Apr-11 22:21 
GeneralRe: *objectName Vs objectName-> Pin
Niklas L18-Apr-11 22:41
Niklas L18-Apr-11 22:41 
GeneralRe: *objectName Vs objectName-> Pin
rahul.kulshreshtha19-Apr-11 0:11
rahul.kulshreshtha19-Apr-11 0:11 

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.