query
-
can we use # sign at places other than with the header files
-
can we use # sign at places other than with the header files
Yes, you should have
#include
in your cpp as well. Other uses are the various#pragma
s,#define
, and is a part of preprocessor operators[^] Header files are simply to separate definition from implementation generally speaking. They aren't anything special as far as the language itself is concerned. EDIT: And preprocessor directives[^] in general, just to clarify. -
can we use # sign at places other than with the header files
Member 12917984 wrote:
can we use # sign at places other than with the header files
The answer is YES, but the question do not really make sense. # is commonly used with conditional compilation #if, #elif, #else, and #endif. You should rather explain what you want to do with # Here is links to references books on C and C++ by the authors of the languages. Note than C is the ancestor of C++, so knowing C is always useful with C++. The C Programming Language - Wikipedia, the free encyclopedia[^] https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf[^] http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf[^] C++ Programing Language[^]
Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein