+ 1

What is # use for

9th Mar 2021, 6:47 AM
Mohammad mubeen
Mohammad mubeen - avatar
11 Respostas
+ 2
From what I know about C and C++, '#' is used for including libraries (a collection of code containing functions, which may or may not be written in the same language). {Sorry but this isn't completely correct}
9th Mar 2021, 6:54 AM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Hey there Mohammad mubeen, Please add relevant tags and specify your programming language. Thanks 🙂 https://www.sololearn.com/Discuss/333866/?ref=app Btw for example if you mean python, "#" is used for a single line commend, ignored by the compiler. Or in the c languages, if I'm correct, it's used to import any type of file, like directives.
9th Mar 2021, 6:48 AM
Matthew
Matthew - avatar
+ 1
Martin Taylor Thanks for rectifying my mistake. What does inserting header files actually do?
9th Mar 2021, 12:40 PM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Martin Taylor Thank you very much for the detailed explanation. But what is the point of declaring a prototype if it's already included by the linker? I mean, what purpose does # include actually serve in a C code?
10th Mar 2021, 6:15 PM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Martin Taylor Thank you once again!
10th Mar 2021, 7:32 PM
Calvin Thomas
Calvin Thomas - avatar
0
Martin Taylor And the linker uses this to add the required libraries, right? Thanks.
10th Mar 2021, 2:15 AM
Calvin Thomas
Calvin Thomas - avatar