error question !!

void main()
{
one=10; two=20;
callme(one,two);
callme(two);
}

void callme(int arg1, arg2)
{
arg=arg+arg2;
count<<arg1>>arg2;
}


what is error in it ??????also explin me how can this program run?????
void main() is wrong. If your compiler accepts this, it is wrong. Stop using it and get one a better one.

one=10; two=20;

You are using one and two without having created them. You must create an object before you can start using it. How is the compiler to know is these are mean to be int, double, char or anything else?

callme(two);

There is no function named callme that accepts a single input parameter.

void callme(int arg1, arg2)

What kind of object is arg2? Is it an int? You need to state that.

count<<arg1>>arg2;

This just makes no sense at all.

The problem here is that you just do not understand C++. You've not made one or two simple mistakes; you just don't know C++.
Last edited on
closed account (z05DSL3A)
The problem here is that you just do not understand C++. You've not made one or two simple mistakes; you just don't know C++.

They* look like test questions from a book.


*this and the other posts.
Topic archived. No new replies allowed.