Click here to Skip to main content
15,905,068 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: *objectName Vs objectName-> Pin
«_Superman_»18-Apr-11 22:09
professional«_Superman_»18-Apr-11 22:09 
GeneralRe: *objectName Vs objectName-> Pin
rahul.kulshreshtha18-Apr-11 22:19
rahul.kulshreshtha18-Apr-11 22:19 
Questionpreprocessor directives - resource Pin
g_satish18-Apr-11 21:03
g_satish18-Apr-11 21:03 
AnswerRe: preprocessor directives - resource Pin
Niklas L18-Apr-11 22:04
Niklas L18-Apr-11 22:04 
AnswerRe: preprocessor directives - resource Pin
వేంకటనారాయణ(venkatmakam)18-Apr-11 23:32
వేంకటనారాయణ(venkatmakam)18-Apr-11 23:32 
QuestionRe: preprocessor directives - resource Pin
g_satish19-Apr-11 0:03
g_satish19-Apr-11 0:03 
AnswerRe: preprocessor directives - resource Pin
Niklas L19-Apr-11 0:33
Niklas L19-Apr-11 0:33 
GeneralRe: preprocessor directives - resource Pin
g_satish19-Apr-11 0:42
g_satish19-Apr-11 0:42 
GeneralRe: preprocessor directives - resource Pin
David Crow19-Apr-11 7:22
David Crow19-Apr-11 7:22 
GeneralRe: preprocessor directives - resource Pin
g_satish19-Apr-11 19:12
g_satish19-Apr-11 19:12 
AnswerRe: preprocessor directives - resource Pin
వేంకటనారాయణ(venkatmakam)19-Apr-11 0:33
వేంకటనారాయణ(venkatmakam)19-Apr-11 0:33 

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.