Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with a little symbol
Message
 
To
12/05/2006 18:11:47
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01121538
Message ID:
01121784
Views:
9
>i use windows sever 2003 and visual c++ 6.0
>
>i compiled the following code that i copied from a book:
>
>
>
>void CDialogsDlg::OnYesnocancel()
>
>{
>	// TODO: Add your control notification handler code here
>
>	//////////////////////////////
>	// MI CODIGO INICIA AQUI
>	//////////////////////////////
>
>	int iResults;	//Esta variable la seleccion del boton
>
>	//Pregunta al usuario
>
>		iResults = MessageBox("Press the Yes, No or Cancel button",	"Yes, No, Cancel Dialog",MB_YESNOCANCEL¦MB_ICONINFORMATION);
>	
>	//Determine en cual boton hizo click el usuario
>	//Le proporciona al usuario un mensaje que muestra en cual boton se hizo click
>	switch(iResults)
>	{
>	case IDYES:		//El boton Yes?
>		m_sResults = "Yes! Yes! Yes! ";
>		break;
>	case IDNO:		//El boton No?
>		m_sResults = "No no, no,no, no";
>		break;
>	case IDCANCEL:	//El boton Cancel?
>		m_sResults = "Sorry, canceled.";
>		break;
>	}
>
>	//Actualiza el dialogo
>	UpdateData(FALSE);
>
>	//////////////////////////////
>	// MI CODIGO TERMINA AQUI
>	//////////////////////////////
>
>
>}
>
>
>
>
>
>and i got this results
>
>Deleting intermediate files and output files for project 'Dialogs - Win32 Debug'.
>--------------------Configuration: Dialogs - Win32 Debug--------------------
>Compiling resources...
>Compiling...
>StdAfx.cpp
>Compiling...
>Dialogs.cpp
>DialogsDlg.cpp
>C:\Archivos de programa\Microsoft Visual Studio\MyProjects\Dialogs\DialogsDlg.cpp(203) : error C2018: unknown character '0xa6'
>C:\Archivos de programa\Microsoft Visual Studio\MyProjects\Dialogs\DialogsDlg.cpp(203) : error C2143: syntax error : missing ')' before 'constant'
>C:\Archivos de programa\Microsoft Visual Studio\MyProjects\Dialogs\DialogsDlg.cpp(203) : error C2059: syntax error : ')'
>Generating Code...
>Error executing cl.exe.
>
>Dialogs.exe - 3 error(s), 0 warning(s)
>
>
>
>I know that the problem is with this symbol "¦" in the following line
>
>
>iResults = MessageBox("Press the Yes, No or Cancel button",	"Yes, No, Cancel Dialog",MB_YESNOCANCEL¦MB_ICONINFORMATION);
>
>
>but i copied exactly as the code was in the book ,what can i do?
>Thank You for answering
>
>Luis Martin

It must be
iResults = MessageBox("Press the Yes, No or Cancel button", "Yes, No, Cancel Dialog",MB_YESNOCANCEL || MB_ICONINFORMATION);
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform