Home » Developer & Programmer » Precompilers, OCI & OCCI » C2001: newline in constant error: HELP!
C2001: newline in constant error: HELP! [message #302461] Mon, 25 February 2008 17:57 Go to next message
Tiffers990
Messages: 1
Registered: February 2008
Location: D.C.
Junior Member
#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
int price,
inventory,
sold,
revenue,
balance,
percentage,
initial;
{
// prompt first number
Console::WriteLine( L"Enter price of the product: “ );
price = Int32::Parse( Console::ReadLine() );

Console::WriteLine( L"Enter initial quantity in inventory: “ );
inventory = Int32::Parse( Console::ReadLine() );

Console::WriteLine( L"Enter quantity sold: “ );
sold = Int32::Parse( Console::ReadLine() );
}
// find the revenue
revenue = sold * price

Console::WriteLine( L"\nRevenue is: {0}.” , revenue.ToString() );

// find inventory balance
balance = inventory – sold

Console::WriteLine( L"\nInventory balance is: {0}.” , balance.ToString() );

// find inventory percentage
percentage = (sold / inventory) * 100

Console::WriteLine( L"\nPercentage of inventory sold is: {0} .” , percentage.ToString() );

// amount of initial inventory
initial = inventory * price

Console::WriteLine( L"\nInitial inventory value was: {0}.” , initial.ToString() );


return 0;
} // end _tmain

Re: C2001: newline in constant error: HELP! [message #302469 is a reply to message #302461] Mon, 25 February 2008 19:04 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
HUH? What made you post this in an Oracle TEXT forum??
Re: C2001: newline in constant error: HELP! [message #302515 is a reply to message #302461] Tue, 26 February 2008 00:21 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This error generally happens when there is a " missing.

Regards
Michel
Previous Topic: ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255
Next Topic: Re: sqlcxt error
Goto Forum:
  


Current Time: Fri Mar 29 10:04:08 CDT 2024