ronreiter / interactive-tutorials

Interactive Tutorials
Apache License 2.0
4.04k stars 2.56k forks source link

[learn-c.org] C tutorial uses the C++ compiler #702

Open wf- opened 2 years ago

wf- commented 2 years ago

Duplicate of #426, but it seems to still be present. Verified using the following code:

#include <stdio.h>

int main() {
#ifdef __cplusplus
    printf("whoops!\n");
#endif
    return 0;
}
wf- commented 2 years ago

It looks like the language_id's value in DOMAIN_DATA[LEARNC_DOMAIN] is wrong (should be 11 - https://sphere-engine.com/supported-languages#11). https://github.com/ronreiter/interactive-tutorials/blob/b76744be857a9e2234e702e867e59689eae9ece7/constants.py#L195-L198