CS50错误:称为对象类型' int'不是C中的函数或功能点
我是编程的新手,目前我正在哈佛EDX参加CS50课程。我正在尝试解决“信用”问题,但是无论我让自己陷入这个错误:称为对象类型'int'不是函数或点。
我已经尝试阅读书籍片段,该网站上的答案,没有什么有意义的原因,对我来说(我承认是新手),我的int被宣布为功能!有人可以帮我看看这个问题的灯光吗?我将在下面的下面复制并粘贴我的代码:
int lenght_card = 0;
long visa_start = card;
long amex_start = card;
long master_start = card;
while (card > 0)
{
card = card/10;
lenght_card++;
}
//将卡标识为Visa
{
visa_start = card/10000000000000;
}
if ((visa_start == 4)(lenght_card == 16 || lenght_card == 13));
{
printf("%s\n," "VISA");
return 0;
ps:该错误在第86行中显示了错误:( lenght_card == 16 | |。
预先感谢!
I'm a newbie at programming and currently I'm taking the CS50 course at Harvard edX. I'm trying to solve the "credit" problem but no matter what I keep myself stuck in this error: called object type 'int' is not a function or point.
I've already tried to read book fragments, answers on this website and nothing makes sense cause, to me (a newbie, I admit), my int is declared a function!! Can someone help me to see the light on this problem? I'll copy and paste my code here below:
int lenght_card = 0;
long visa_start = card;
long amex_start = card;
long master_start = card;
while (card > 0)
{
card = card/10;
lenght_card++;
}
// Identifying the card as Visa
{
visa_start = card/10000000000000;
}
if ((visa_start == 4)(lenght_card == 16 || lenght_card == 13));
{
printf("%s\n," "VISA");
return 0;
PS: the error shows up in the line 86 specifically: (lenght_card == 16 || lenght_card == 13));
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有错别字。
例如,在此语句中,
您需要在语句结束时删除分号,并且似乎错过了逻辑和操作员,
另一个错字是在此呼叫中,
应在格式之外
逗号
There are typos.
For example in this if statement
you need to remove the semicolon at the end of the statement and seems you missed the logical AND operator
Another typo is in this call
The comma shall be outside the format string
You could just write