Thanks. Really it worked. It solved my problem.


On Jul 29, 9:34 am, ka-bar <[EMAIL PROTECTED]> wrote:
> codes:
> #include <stdio.h>
>
> typedef unsigned char BYTE;
>
> int main()
> {
>         char MsgToBeSigned[20];
>         BYTE* pbMessage;
>
>         printf(" \n Enter a short Message...");
>         scanf("%s", MsgToBeSigned);
>
>         pbMessage = (BYTE*)(MsgToBeSigned);
>         printf("%s\n",(char*)pbMessage);
>         getchar();
>         getchar();
>         return 0;
>
> }
>
> I've already test it in vc8 with no problem.
>
> goodluck,
> ka-bar
>
> On 7月29日, 上午3时02分, Wilayat <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi
>
> > I want to read an string and then convert it to a BYTE Pointer.
> > Before it was like below:
>
> > Code:
> > BYTE* pbMessage;
> > pbMessage = (BYTE*)TEXT("Hello");
>
> > it worked and no problems. Now i want to enter a short message during
> > run time. so i changed to the following:
>
> > Code:
> > char MsgToBeSigned[20];
> > BYTE* pbMessage;
>
> > printf(" \n Enter a short Message...");
> > scanf_s("%c", MsgToBeSigned);
>
> > pbMessage = (BYTE*)TEXT(MsgToBeSigned);
>
> > it gives the error: error C2065: 'LMsgToBeSigned' : undeclared
> > identifier
>
> > If i changed the statement
> > Code:
> >  pbMessage = (BYTE*)TEXT(MsgToBeSigned);to
>
> > Code:
> > pbMessage = (BYTE*)(MsgToBeSigned);then it gives the error: error
> > C2065: 'MsgToBeSigned' : undeclared identifier
>
> > Can anybody help me? I need few line of code which can get a short
> > message at run time, and then store it in a BYTE pointer.
>
> > regards,
> > wilayat- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to