C++ Builder IDE >> DecimalSeparator fails

by Clovis » Wed, 14 Dec 2005 06:28:44 GMT

Hello,
My program must be able to run for different decimal system.
So I need to use DecimalSeparator. But then I get a *char char error.
Do I need to include a header file to get it running ? if yes which one?
Thanks


C++ Builder IDE >> DecimalSeparator fails

by Remy Lebeau (TeamB) » Wed, 14 Dec 2005 07:01:11 GMT







Please always quote the EXACT error messages word for word.


Gambit





C++ Builder IDE >> DecimalSeparator fails

by Hans Galema » Wed, 14 Dec 2005 17:26:50 GMT





Please show the code where you use DecimalSeparator. And supply
the exact error.

Hans.


DecimalSeparator fails

by Clovis » Wed, 14 Dec 2005 19:46:04 GMT





the errors are
- type name expected
- cannot convert 'chart*' to 'int'
Thanks


DecimalSeparator fails

by Clovis » Thu, 15 Dec 2005 02:36:15 GMT






The declaration is
DecimalSeparator = ".";
I wrote a mistake, the error is
cannot convert 'chart*' to 'chart'
Thanks for any answer


DecimalSeparator fails

by Clovis » Thu, 15 Dec 2005 02:47:18 GMT



Hello,
It was a simple mistake
= '.'; is good
= "."; is wrong
Thanks


DecimalSeparator fails

by Remy Lebeau (TeamB) » Thu, 15 Dec 2005 03:29:38 GMT






DecimalSeparator is a single character, not a string.

DecimalSeparator = '.';


I think you meant 'char' instead of 'chart'. Again, please always
COPY/PASTE the exact error messages as-is.

As for the error, it is correct, since you are passing the wrong type of
value to DecimalSeparator in the first place.


Gambit




DecimalSeparator fails

by Dar Alejandro Guzik » Thu, 15 Dec 2005 22:55:52 GMT




it should be
DecimalSeparator = '.';
"." is not a char constant.

--
Dar Alejandro Guzik (El T Borracho)
http://tioborracho.tripod.com
e-mail: XXXX@XXXXX.COM
ICQ : 8389493


Similar Threads

1. DecimalSeparator

Hi,

I have this part of code in my app to check if my
'dictionary version' is valid:


   bool TDiMainForm::IsDictionaryVerValid( AnsiString Version )  // <---  
"2.0"
   {
      bool Result = true;

      try
      {
         DecimalSeparator = '.';

         // C() is just LoadStr()
         float Min = StrToFloat( C(IDS_SER_MAIN_APP_DB_VER_MIN) ); // <---  
"2.0"
         float Max = StrToFloat( C(IDS_SER_MAIN_APP_DB_VER_MAX) ); // <---  
"2.5"
         float Ver = StrToFloat( Version );

         if ( ( Ver < Min ) || ( Ver > Max ) )
         {
            Result = false;
         }
      }
      catch ( const Exception &e )
      {
         Result = false;
      }

      return ( Result );
   }

On maybe 500 copies of the program no one complained because
of variety of Regionional Options, but in 2 cases so far the result
of this check was 'false' ?!

When I suggested them to manualy change the Regional Options
and set DecimalSymbol - the app worked!

I know that this seems to be *impossible* but, do you see
what could be wrong to this routine?





-- 
Best regards,
Vladimir Stefanovic 


2. COM+ Activation failed because an initialization function failed

3. How to detect proxy failed or remote host failed

Hi All,

I have an application where I am accessing resources from internet/intranet. 
I am using HttpWebRequest/HttpWebResponse. The connection is made through 
proxy.

During error handling I want to detect if the connection is failed while 
accessing proxy or while accessing remote host. If proxy is failed I want to 
do proxy recovery. (In case multiple proxies are specified then fail over to 
another proxy), in case remote host is failed I just want report the error.

When I catch WebException, the status of WebException in both the cases 
(when proxy is down or remote host is down) is ConnectFailure.

According to MSDN help, if status == ConnectFailure then proxy or firewall 
is failed, but this is not true. I checked by making direct connection 
(without proxy) and if my remote host is down still I get ConnectFailure.

According to MSDN help, HttpWebRequest.Address is suppose to return the 
actaul URL that has responded but I checked even when my proxy is down still 
the HttpWebRequest.Address is the original address pointing to remote host.

I checked the InnerException of the WebException I am getting,it clearly 
showes two different error messages when proxy is down and host is down.

Can anybody help me in detecting if proxy is failed or remote host ? 

4. TransactionEscope Fails - When NetWork Connections Fails (ORACLE) - CSharp/C#

5. CDataExchange::Fail() fails

When I try to call CDataExchange::Fail() function in my member I get the 
following list of errors.

<ERRORS>
error C2059: syntax error : 'constant'
error C2039: 'func1' : is not a member of 'CDataExchange'
error C2039: 'func2' : is not a member of 'CDataExchange'
error C2039: 'AfxMessageBox' : is not a member of 'CDataExchange'
error C2039: 'pDX' : is not a member of 'CDataExchange'
</ERRORS>

The problematic code is below.

<CODE>
CFoo::MyDDV( CDataExchange* pDX )
{
 if( pDX->m_bSaveAndValidate )
 {
  if( ! func1() )
    {
   AfxMessageBox( "ERROR.", MB_ICONEXCLAMATION );
      pDX->Fail();
    }

 }

}
</CODE>

What is wrong?

Thanks 

6. CDataExchange::Fail() fails

7. Debug assertion failed but not failed in release version

Hi

i got "debug assertion failed" in debug version while not get in
release version .

i created dialog box in thread in thread in that i pass parent HWND

when i call "DoModal()" it failed

it failed in WINCORE.CPP at
    		ASSERT((CWnd*)p == this);   // must be us
line,

as i know ,in release version all ASSERT statement are not considered
(compiled) so i am not got in release.

Is there any solution for dubug version ???

thanks in advance

will it create any problem in release version  ???

p2

8. [MFC] CDataExchange::Fail() fails