1 / 2
Feb 2022

I am on the first lesson at learn C .org . And I am stuck already! I cannot see why one of these code will run and the other gives an error.

#incude <stdio.h>

int main() {
printf(“Mixfish”);
return 0;
}

#include <stdio.h>

int main() {
printf(“Mixfish”);
return 0;
}

prog.cpp:4:19: error: ‘printf’ was not declared in this scope
printf(“Mixfish”);
^
#incude <stdio.h>

int main() {
printf(“Mixfish”);
return 0;
}

#include <stdio.h>

int main() {
printf(“Mixfish”);
return 0;
}

  • created

    Feb '22
  • last reply

    Feb '22
  • 1

    reply

  • 529

    views

  • 2

    users

Typo - missing L in include.

In my (20 year ago) experience, C++ was very good at giving a misleading description for compile problems.