hi there)
guys, plesae tell me - what should i change in this code to see message in a console window (i also need define the OS) =
#include <stdio.h>
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#define WINDOWSS 1;
#endif
int main()
{
char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1} \n * Specify \"0\" to exit\n" ;
int mainmenu();
mainmenu();
printf("\n%s",mtext );
}
#if defined WINDOWSS
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE qwe,LPSTR qwer, int ss)
{
int mainmenu();
mainmenu();
char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1} \n * Specify \"0\" to exit\n" ;
printf("\n%s",mtext );
return TRUE;
}
#endif
int mainmenu()
{
char ch;
char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1} \n * Specify \"0\" to exit\n" ;
char* errmes = " Error(!) = Main menu does not support this command.\n Make sure that your task number is from menu set of commands and try again. " ;
printf("\n%s",mtext );
ch = getchar();
switch(ch)
{
case '0': exit(0);
case '1': exit(0); break;
default: printf("\n%s\n", errmes);
}
return 1;
}