cs50 / ide-issues

1 stars 1 forks source link

ide is not recognizing my semi colon #61

Closed Beasttype13 closed 3 years ago

Beasttype13 commented 3 years ago

What symptom did you see (attaching screenshots as necessary)?

Everytime I make population it says error and asks me did I put a semi colon at the end of line 9. Which I keep doing and it keeps giving me the same error message

When date and time (UTC) did the problem happen?

Tuesday 5/11/2021 at 5:45 pm

What steps did you follow to reproduce the problem?

  1. step 1
  2. step 2
  3. step 3

Which web browser did you use (including version number)?

Both microsoft edge and chrome

Which operating system did you use (including version number)?

Did you log in to CS50 IDE using the same GitHub account you used to create this issue?

yes

Asking for help...

dog.c:6:12: error: expected ';' at end of declaration int start size = get_int ("start size:); ^ ;

Are you missing a semicolon at the end of line 6 of dog.c?

dmalan commented 3 years ago

You seem to be missing a double quote!

Beasttype13 commented 3 years ago

include

include

int main (void)

{ //TODO:Prompt user for start size

int start size = get_int("start size:");

}
Thank you for responding. No, here is the code where else does there need to be a double quote? I still get this error 1 error generated. make: *** [: population] Error 1

Asking for help...

population.c:9:14: error: expected ';' at end of declaration int start size = get_int("start size:"); ^ ;

Are you missing a semicolon at the end of line 9 of population.c? ~/ $

dmalan commented 3 years ago

start size isn't a valid variable name, as it has a space!

Beasttype13 commented 3 years ago

Owww success!!! God Bless You!

include

include

int main (void)

{

int n = get_int("start size:");

printf ("start size ,");

$ make population clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow population.c -lcrypt -lcs50 -lm -o population ~/ $ ./population start size: