using const in func declaration.

Hi


If i do something like:

1
2
3
4
5
6
#include <iostream>
using namespace std;

void test(const int a[], double example);



would that make example a constant as well as a?



i would just try it but im on my phone..
No. a is actually not even const. a is a pointer to a const int.
1
2
3
4
5
#include <iostream>
using namespace std;

void const test(int a[], double example);


would this work?
No.
What exactly is he (Omar Alamy ) trying to do??
Learn, I guess.
Topic archived. No new replies allowed.