Answer the question
In order to leave comments, you need to log in
Declaring an identifier #define in a function prototype in C (C), is it possible to do this?
Hello! There is a question: is it allowed to declare a #define identifier in a function prototype in C.
Textbook by Brian Kernighan and Dennis Ritchie, second edition, paragraph 1.9 (Character Arrays). The paragraph considers an example of using functions with arrays passed to them as arguments. The program uses a preprocessor directive to declare a named constant, which is used a few lines below when describing a function prototype.
#include <stdio.h>
#define MAXLINE 500
int get(char line[], int MAXLINE); // В этой строке линтер жалуется на "ожидаемую )". Линковщик спотыкается на этом же месте.
void copy(char to[], char from[]);
Answer the question
In order to leave comments, you need to log in
Oleg Filimonenko ,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question