can someone help me fix this c++ code?

can someone help me fix this c++ code?

include
#include
using namespace std;

long getBarcode(long code);
//Gets the Barcode from the individual.
long verifyCode();
//verifys the code and makes the appropriate conversions.
void displayCode(long& code);
//Dislpays the barcode given by the individual.

int main()
{
long code;

displayCode(code);
return 0;
}
long getBarcode(long code)
//Gets the Barcode from the individual.
{
cout << "Enter the five digit barcode:" << endl;
cin >> code;

while(code > 99999 || code < 0)
{
cout << "Re-enter the barcode" << endl;
cin >> code;
}

return code;
}
long verifyCode()
//verifys the code and makes the appropriate conversions.
{

return 0.0;
}
void displayCode(long& code)
//Dislpays the barcode given by the individual.
{
int a, b, c, d, e, rm, rm2, rm3, rm4;

code = getBarcode(code);
a=code/10000;
rm=code%10000;
b=rm/1000;
rm2=rm%1000;
c=rm2/100;
rm3=rm2%100;
d=rm3/10;
rm4=rm3%10;
e=rm4;

/*if(a==0)
{
a=’||::’;

}

if(a=1)
{
a=’:::||’;
}
if(a=2)
{
a=’::|:|’;
}
if(a=3)
{
a=’::||:’;
}
if(a=4)
{
a=’:|::|’;
}
if(a=5)
{
a=’:|:|:’;
}
if(a=6)
{
a=’:||::’;
}
if(a=7)
{
a=’|:::|’;
}
if(a=8)
{
a=’|::|:’;
}
if(a=9)
{
a=’|:|::;’;
}
*/

cout<

cout << “|”< }

Tags: , , ,

Under Forum

5 Comments for can someone help me fix this c++ code?

  • 1. tony  |  February 15th, 2011 at 8:36 am

    you broke it

  • 2. siamese_scythe  |  February 15th, 2011 at 8:39 am

    Please describe the problem:

    1) Compile error? (If so, what?)
    2) Runtime error? (If so, what?)
    3) Fails test cases? (If so, which?)

  • 3. albert joe  |  February 15th, 2011 at 9:22 am

    Wat is your problem??Elaborate It??!!

  • 4. Joe Savage  |  February 15th, 2011 at 9:52 am

    I suggest you post any errors and/or problems you are having..
    If you want some C++ lessons to help you fix the program, http://www.dev-hq.co.uk/1-C++ is a good place to learn..

  • 5. bubbles  |  June 20th, 2011 at 9:18 pm

    I have been trying to resolve the access violation in the program for bounding volume hierarchy. I get an access violation error while running it. I have used SDL and lib3d packages.
    I’m using visual studio 2010 on windows 7

    >Error: Unhandled exception at 0x00fa2e80 in bvh.exe: 0xC0000005: Access violation reading location 0×00000004.

    Call Stack :> `bvh.exe!Triangle::Triangle(const Vertex * vertexA, const Vertex * vertexB, const Vertex * vertexC, unsigned int r, unsigned int g, unsigned int b, bool twosided, bool triNormalProvided, Float3 triNormal)` Line 393 + 0×150 bytes C++

    here is the link to my code [C++] BVH_SAH – Pastebin.com
    can anyone help with it.

    Thank you

Leave a Comment for can someone help me fix this c++ code?

You must be logged in to post a comment.

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories