Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can't link to a library in Visual studio 2005 Pin
Hamid_RT18-Sep-06 19:36
Hamid_RT18-Sep-06 19:36 
AnswerRe: Can't link to a library in Visual studio 2005 Pin
Cedric Moonen18-Sep-06 20:01
Cedric Moonen18-Sep-06 20:01 
GeneralRe: Can't link to a library in Visual studio 2005 Pin
BarryOg18-Sep-06 20:56
BarryOg18-Sep-06 20:56 
GeneralRe: Can't link to a library in Visual studio 2005 Pin
Cedric Moonen18-Sep-06 21:07
Cedric Moonen18-Sep-06 21:07 
GeneralRe: Can't link to a library in Visual studio 2005 Pin
BarryOg18-Sep-06 22:05
BarryOg18-Sep-06 22:05 
QuestionHow to Output A Character Multiple Times - New To C++ Pin
Mark_Murphy18-Sep-06 11:18
Mark_Murphy18-Sep-06 11:18 
AnswerRe: How to Output A Character Multiple Times - New To C++ Pin
Christian Graus18-Sep-06 12:44
protectorChristian Graus18-Sep-06 12:44 
AnswerRe: How to Output A Character Multiple Times - New To C++ Pin
George L. Jackson18-Sep-06 13:30
George L. Jackson18-Sep-06 13:30 
The below code is not the simplest way of doing what you want. However, I assume you will be changing the X's as the user guesses the word. Thus, you can modify the PrintChar class to compare the guess with the answer, and print either an 'X' or the correct character.

#include <string>
#include <iostream>
#include <algorithm>

using std::wcout;
using std::endl;
using std::for_each;
using std::wstring;

class PrintChar {
public:
void operator() (const wchar_t& c)
{
wcout << L'X';
}
};

int _tmain(int argc, _TCHAR* argv[])
{
wstring answer = L"telephone";

for_each(answer.begin(), answer.end(), PrintChar());
wcout << endl;

return 0;
}
GeneralRe: How to Output A Character Multiple Times - New To C++ Pin
Mark_Murphy18-Sep-06 13:41
Mark_Murphy18-Sep-06 13:41 
GeneralRe: How to Output A Character Multiple Times - New To C++ Pin
George L. Jackson18-Sep-06 14:45
George L. Jackson18-Sep-06 14:45 
QuestionCToolBar winth CFormView Pin
serferreiras18-Sep-06 10:40
serferreiras18-Sep-06 10:40 
QuestionUNICODE to ASCII Conversion Pin
AlekseyUS18-Sep-06 10:33
AlekseyUS18-Sep-06 10:33 
QuestionRe: UNICODE to ASCII Conversion Pin
David Crow18-Sep-06 10:35
David Crow18-Sep-06 10:35 
AnswerRe: UNICODE to ASCII Conversion Pin
AlekseyUS18-Sep-06 10:40
AlekseyUS18-Sep-06 10:40 
AnswerRe: UNICODE to ASCII Conversion Pin
Shog918-Sep-06 11:11
sitebuilderShog918-Sep-06 11:11 
GeneralRe: UNICODE to ASCII Conversion Pin
AlekseyUS18-Sep-06 11:43
AlekseyUS18-Sep-06 11:43 
AnswerRe: UNICODE to ASCII Conversion Pin
Amar Sutar18-Sep-06 18:05
Amar Sutar18-Sep-06 18:05 
AnswerRe: UNICODE to ASCII Conversion Pin
Hamid_RT18-Sep-06 19:40
Hamid_RT18-Sep-06 19:40 
QuestionQuestion? Pin
#hackC++18-Sep-06 10:03
#hackC++18-Sep-06 10:03 
AnswerRe: Question? Pin
Zac Howland18-Sep-06 10:16
Zac Howland18-Sep-06 10:16 
QuestionHow do I use a string as a parameter in a Win32 api function? Pin
BarryOg18-Sep-06 10:02
BarryOg18-Sep-06 10:02 
AnswerRe: How do I use a string as a parameter in a Win32 api function? Pin
Zac Howland18-Sep-06 10:19
Zac Howland18-Sep-06 10:19 
GeneralRe: How do I use a string as a parameter in a Win32 api function? Pin
BarryOg18-Sep-06 10:49
BarryOg18-Sep-06 10:49 
GeneralRe: How do I use a string as a parameter in a Win32 api function? Pin
Zac Howland18-Sep-06 10:52
Zac Howland18-Sep-06 10:52 
GeneralRe: How do I use a string as a parameter in a Win32 api function? Pin
BarryOg18-Sep-06 11:17
BarryOg18-Sep-06 11:17 

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.