> For the complete documentation index, see [llms.txt](https://mr-poston-1.gitbook.io/c++/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mr-poston-1.gitbook.io/c++/2.-going-beyond-the-basics/2.2-function-default-values/2.2.3-default-values-with-a-prototype.md).

# 2.2.3 Default Values with a Prototype

Recall that a prototype is an advanced declaration of a function. You saw earlier that prototype needs to have the same function header. While that is still true, the one clarification to that is that ***you only define default values in the prototype***.

```
// Define the default value here
double pow(double base, int exp = 2);

int main() { // Some code }

// Do not define the default value here
double pow(double base, int exp){
        // Some Code
}
```

The function definition still needs to have the same parameters and the same order, but you do not list the default value a second time.

### [Try This Example](https://replit.com/@Poston/223-Default-Values-with-Prototype#main.cpp)
