It looks like you're trying to send arguments to two different primitive variables, which will of course return an error, as only functions can take arguments. What you should do is declare those doubles as functions with some sort of return type (depending on what it is you want them to do) and takes two arguments of whatever type Array is defined as.
#include <iostream>
using namespace std;
int main ()
{unsigned long x,nr;
unsigned c;
cout<<"x="; cin>>x;
nr=0;
if(x=0)
nr=1;
while(x!=0) {c=x%10;
nr=nr+1;
x=[x/10];
cout<<"nr="<<nr;
return 0;}
}
Please help me to correct the mistake (error: expected primary-expression before '[' token)