C/C++ DataType for DB2 DECIMAL(18,3)

R

Ramz

Hi

We are trying to convert our DB2 code to C/C++. We are facing a problem
of DECIMAL conversion. When we try to compile the C++ program with
<decimal.h> file , it 's giving the following error

main()
{
decimal(18,3) x1;
---> Syntax error - expected ";" and found "x1"


Pls. suggest as we are in the midst of a performance exercise &
completely stuck up.

Rgds
Ram
 
T

Tydr Schnubbis

Ramz said:
Hi

We are trying to convert our DB2 code to C/C++. We are facing a problem
of DECIMAL conversion. When we try to compile the C++ program with
<decimal.h> file , it 's giving the following error

main()
{
decimal(18,3) x1;
---> Syntax error - expected ";" and found "x1"


Pls. suggest as we are in the midst of a performance exercise &
completely stuck up.

Rgds
Ram
I think you should ask in the comp.lang.c++ instead. And maybe read a
book on C++ before you try using it, then it would be pretty obvious
that you've put the '(18, 3)' part in the wrong position. Try moving it
a bit later on the line. Read the error message, it pretty much tells
you what the problem is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top