Thread: New to C++ Programming: One error in compiler, Please Help.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    5

    Question New to C++ Programming: One error in compiler, Please Help.

    Error E2451 C:\algorithim.cpp 18: Undefined Symbol 'cout' in function main.
    Error E2451 C:\algorithim.cpp 19: Undefined Symbol 'endl' in function main.
    Error E2451 C:\algorithim.cpp 22: Undefined Symbol 'cin' in function main.
    Any Suggestions?


    /*Question 5 Program*/

    int main()

    {
    int A;
    int B;
    int C;
    int D;
    int E;
    int F;
    int G;
    int N;
    int P;
    int S;
    int T;

    cout << "My first algorithim program.";
    cout << endl;
    cout << "Please enter pay rate";
    cout << endl;
    cin >> A;

    cout << endl;
    cout << "Please enter number of hours worked for this week.";
    cout << endl;
    cin >> B;

    cout << endl;
    cout << G = A * B;
    cout << "Income before taxes.";
    cout << A * B;

    cout << endl;
    cout << T = G * .14;
    cout << N = G - T;
    cout << "Income after taxes.";
    cout << G - T;

    cout << endl;
    cout << C = N * .10;
    cout << "Income spent on clothes and other accessories.";
    cout << N * .10;

    cout << endl;
    cout << D = N * .01;
    cout << "Income spent on school supplies";
    cout << N * .01;

    cout << endl;
    cout << F = C + D;
    cout << E = G - F;
    cout << S = E * .25;
    cout << "Income spent on savings bonds.";
    cout << E * .25;

    cout << endl;
    cout << P = S * .5;
    cout << "Money your parents matched to buy savings bonds";
    cout << S * .5;

    return 0;
    }
    Last edited by jljg23; 01-26-2010 at 03:44 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM