I recently migrated my old Cloud9 IDE over to the new AWS format per instructions and all of my files appeared in the new environment. I had only just completed lecture 1 and was starting to make the example programs hello.c and hello2.c from the short videos in the 2018 course. hello.c still compiles. However , when I try to compile hello2.c, I receive an error regarding the line that contains get_string();.
Here is hello2.c:
#include <stdio.h>
#include <cs50.h>
int main(void)
{
printf("Enter your name: ");
string name = get_string();
printf("hello, %s!\n", name);
}
Here is the file within my workspace directory:
~/workspace/ $ ls -l total 4 -rw------- 1 ubuntu ubuntu 185 Nov 23 04:38 hello2.c
And here is the error:
~/workspace/ $ make hello2 clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow hello2.c -lcrypt -lcs50 -lm -o hello2
hello2.c:7:13: error: expected expression
name = get_string();
^
/usr/include/cs50.h:109:53: note: expanded from macro 'get_string'
#define get_string(...) get_string(NULL, __VA_ARGS__)
^
1 error generated.
: recipe for target 'hello2' failed
make: *** [hello2] Error 1