ronreiter/interactive-tutorials

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

Opened this issue · 1 comments

wf- commented

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

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).

DOMAIN_DATA[LEARNC_DOMAIN] = {
"language" : "c",
"language_id": 1,
"codemirror_mode": "text/x-csrc",