help i'm rather new at this but have some understanding but am having some probs with

1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(19) : error C2660: 'atotal' : function does not take 1 arguments
1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(21) : error C2061: syntax error : identifier 'a'
1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(23) : error C2660: 'atotal' : function does not take 1 arguments

here is my code

#include <set>
#include <iostream>

using namespace std;
    Dim ; double atotal()

;int main()
{
    double itotal = 0;
    double dnumber1 = 0.0;
    double dnumber2 = 0.0;
    double dnumber3 = 0.0;
    double daverage = 0.0;
    double a = 0;

    cout << "please enter how many numbers: " <<endl;
    cin >> itotal;
    atotal(itotal);
    cout << "start entering numbers" <<endl;
    for a to itotal;
    {
        cin >> atotal(a);
    }
    //cin >> dnumber1;
    //cin >> dnumber2;
    //cin >> dnumber3;

    daverage = (dnumber1 + dnumber2 + dnumber3) / 3;

    cout << "the average for your numbers is : " << daverage << endl <<endl;

    system ("pause");
    return 0;
}

btw it is writen in a console aplication file if that helps in any way

if you have any other ideas on additions to the code please post them.

Thx.

p.s. i am trying to make it so that an input box opens for a variable amount of numbers to be averaged

line 5: remove "Dim ;" -- that's not a valid statement

line 7: remove the ; from the beginning of the line and put it at the end of the previous line

line 18: The number of parameters and type of parameters must match exactly with those shown in the function prototype that appears on line 5. If you want function atotal to have a parameter then you have to specify it in the function prototype.

line 20: the statement is formatted incorrectly. Should be like this: for(a = 0; a < itotal; ++a)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.