开发者

Syntax error in C program

开发者 https://www.devze.com 2023-03-18 18:28 出处:网络
#include < st开发者_高级运维dio.h > int main() { char *s; s=call(); printf(s); } char* call() {
#include < st开发者_高级运维dio.h >

int main() {
    char *s;
    s=call();
    printf(s);
}

char* call() {
    return("hello");
}

Why these code not working. It's generating an error. How do I make it work?


Two things:

  • You can't put spaces inside the angle brackets when including a system header (e.g. #include <stdio.h>
  • You need a prototype for call()
0

精彩评论

暂无评论...
验证码 换一张
取 消