0
We made Myclass.h and saved it
by using "#include"Myclass.h" are we invoking it ????? in other programs
13 Respuestas
0
Put your Myclass.h file in the same folder as your currentfile.cpp .Now everytime your program runs your compiler fetches the code of Myclass.h and inserts into your program similar to a macro substitution.
+ 1
Correct u got my point.Provided that location is the default folder for storing header files
0
You are just adding the lines of code in Myclass.h onto your current file.
Contents of Myclass.h is retrieved by the compiler and placed for processing.
0
Don't know hindi bro.English could be a better option.
0
okay does it mean we can use myclass CPP file in any future programs ??? codeblock (or ur compiler ) would find the file from disc each time we invoke it in a program
0
oooooooo😌😌😌 I see thanks bro ...I was confused what type of header file it was
0
Note if you have your Myclass.h and iostream.h on the same folder use include<my class.h>
else if currentfile.cpp and Myclass.h lies in the same folder as I told earlier use include"my class.h"
0
bro can u tell me reason behind it ?
0
for what use of "" or <> ????
0
yes
why r using
""sometimes and <> other times
0
<> the complier looks for the file on the default directory i.e folder for storing header files.
"" the compiler looks for the file on the storage location of the currentfile.cpp.It can even be your desktop .
0
and if currenfile.CPP, iostrem.h and my class.h are in same folder than we can use <> ??
0
oh thanks bro ,thank you very much .👍