我正在尝试运行此代码,但在终端上它显示“初始化器元素不是编译时常量:
#include <cs50.h>
#include <stdio.h>
int main(void)
int i = get_int ('first population: ')
int j = get_int ('second population: ')
您的代码错误。仔细阅读学习材料的前几章:
你想要这个:
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int i = get_int ('first population: ');
int j = get_int ('second population: ');
...
more code
...
}