in C++ what are Parameters and Arguments?

Recommended Answers

All 3 Replies

Both terms mean the same thing -- they are what you pass to a function

void foo(int x) // x is a parameter
void foo(char *x) // x is also a parameter here

int main())
{
   int x;
   foo(x); // pass an argument to function named foo
}

thank you but can you give mean a defination for the words too?

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.