I was trying to run the below program on CS50 IDE, however it shows an error, is it something wrong with the CS50 IDE ?
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int n;
do
{
n = get_int("Size: ");
}
while (n < 1);
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
printf("#");
}
printf("\n");
}
}
The error was:
~/pset1/Mario/ $ clang -o mario mario.c
/tmp/mario-cd1aec.o: In function main':
mario.c:(.text+0x26): undefined reference to
get_int'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make mario
instead of clang