Error C2064: term does not evaluate to a function taking 1 arguments - C (СИ)
Формулировка задачи:
компилю в Visual Stdudio 2005
выдает ошибку error C2064: term does not evaluate to a function taking 1 arguments
сама программа
#include <stdafx.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <conio.h>
//--------------------------------------------------------------
bool prostoe (int a)
{
bool res=true;
int i;
for (i=1; i<=(int)(sqrt(4.0)(a)); i++)
if (a % i == 0)
{
res = false;
break;
}
return true;
}
//--------------------------------------------------------------
int main()
{
const int maxn = 100;
unsigned short int a[maxn];
int n,j;
printf("n = ");
scanf("%d",&n);
a[0] = 2;
a[1] = 3;
int i;
for (i = 2; i<=n; i++)
{
j = a[i-1] + 2;
while (!prostoe(j))
j+= 2;
a[i] = j;
getch();
}
}Решение задачи: «Error C2064: term does not evaluate to a function taking 1 arguments»
textual
Листинг программы
bool prostoe (int a);