cs50 / libcs50

This is CS50's Library for C.
https://cs50.readthedocs.io/libraries/cs50/c/
GNU General Public License v3.0
1.74k stars 853 forks source link

library doesn't work in windows #293

Closed carlo8767 closed 1 year ago

carlo8767 commented 1 year ago

From your instruction, it is not clear if your library is compatible with Windows. I have tried but when I tried to use gets string testing =get_string("name") and import your library compare an error : In file included from helloCarlo.c:3: cs50.c:78:28: note: expected 'char *' but argument is of type 'char ' 78 | string get_string(va_list args, const char format, ...) | ~~~^~ helloCarlo.c:8:21: error: too few arguments to function 'get_string' 8 | string testing =get_string("name");

carlo8767 commented 1 year ago

This is my file 👍

include

include"cs50.h"

include"cs50.c"

int main(void){

string testing =get_string("name");
printf("Hello world\n");

}

rongxin-liu commented 1 year ago

On Windows, please install WSL: https://cs50.readthedocs.io/submit50/#installation