错误:期望一个标识符

Cal*_*nce 0 c random identifier

我使用Visual Studio得到以下错误:

41 IntelliSense:需要一个标识符

我不知道这是想说什么,任何帮助将不胜感激!:d

这是程序:

#include <stdio.h>
#include <math.h>

int
main(void)
{
         long long d;
     long long p;

     //Ask for numbers of days as long as input is not between 28 and 31

    do
    {
    printf("How may days are in your month?\n");
    d = GetInt();
    }
    while (d<28 || d>31);


    //Ask for numbers of pennies for day 1 as long as input is negative



    printf("How many pennies do you have");
    do
    {
        p = GetInt();
    }
    while ("p<0");


    //Sum up the pennies, pennies = (pennies*2)*2..*2

    int 1;
    for (i=0; i<= d-1; i++);
        {

            p=p*pow(2,i);
        }       
    printf("%lld\n", p);
    return 0;
}`
Run Code Online (Sandbox Code Playgroud)

Rob*_*der 5

int 1;
for (i=0; i<= d-1; i++);
Run Code Online (Sandbox Code Playgroud)

在这里你有int 1;这样的编译器正在寻找一个变量名称,如int x = 1; Now for for循环,;从最后删除它

main你的前两行里面

long long d;
long long p;
Run Code Online (Sandbox Code Playgroud)

long是一个类型,所以将这些行更改为

long d;
long p;
Run Code Online (Sandbox Code Playgroud)

在我看到的文件的末尾}',这里删除该'字符

另外,我可以看到你有while ("p<0");while条件,这里"p<0"是一个字符串,你可能想把它改成p<0.