Johncili
asked on
where is wrong? help!
AnsiString secret=InputBox("Veri.","p
if (Session->AddPassword(secr
{ShowMessage("Can not open the file");
Application->Terminate();}
else{
return;//continue
);
What error are you getting?
ASKER
AnsiString secret=InputBox("Veri.","p assword"," Default");
if (Session->AddPassword(secr et)==false ) <<======= ???
{ShowMessage("Can not open the file");
Application->Terminate();}
else{
return;//continue
}
Can not run. See where ??? shows.
if (Session->AddPassword(secr
{ShowMessage("Can not open the file");
Application->Terminate();}
else{
return;//continue
}
Can not run. See where ??? shows.
Please compile this in DEBUG mode and trace through the steps.
When the program fails, copy the error message and paste it here.
If the program will not compile, please copy the error message you get from the compiler and paste it here so we can see it.
When the program fails, copy the error message and paste it here.
If the program will not compile, please copy the error message you get from the compiler and paste it here so we can see it.
ASKER
Char *buf1 = "aaa", *buf2;int ptr;
buf2=InputBox("Veri.","pas sword","De fault");
ptr = strcmp(buf2, buf1);
if (ptr >0 || ptr <0)
{ShowMessage("Wrong! ");
Application->Terminate();}
else {};
buf2=InputBox("Veri.","pas sword","De fault"); ????
buf2=InputBox("Veri.","pas
ptr = strcmp(buf2, buf1);
if (ptr >0 || ptr <0)
{ShowMessage("Wrong! ");
Application->Terminate();}
else {};
buf2=InputBox("Veri.","pas
ASKER
C++ Error: Cannot convert 'AnsiString' to'char*'??
How to modify?
How to modify?
I'm not familiar with AnsiString.
Try
Session->AddPassword((char *)secret)
Try
Session->AddPassword((char
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To convert the string to AnsiString you could use the
UnicodeToAnsi and the
AnsiToUnicode
functions
UnicodeToAnsi and the
AnsiToUnicode
functions
if (Session->AddPassword(secr
{ShowMessage("Can not open the file");
Application->Terminate();}
else{
return;//continue
); <- change ');' to '}' (without quotes of course)
Rgds.