Viewing 0 reply threads
You must be logged in to reply to this topic.
While compiling ns2, finally, it(the make command) will generate a binary executable file in the name “ns”. If you run that command you will have % prompt. (just similar to a tcl shell prompt).
Ok.
ns is made up of thousands of such individual C++ files (*.cc)
In C++ (and in c) there is a convention that the some constants, variables, function prototypes and the class objects were declared in a header file(*.h) with the same name of the c++ file which will use those constants, variables, functions and classes.
While compiling(making) ns2 using make command, all those refereed C++ files will get compiled individually and the corresponding, generated object files (binary) will be finally linked (using the linker) which will produce the final binary file “ns” (in windows, it will be ns.exe)
Note :
You can not use them (C++/h) separately just like a normal C program which you will write in your C++ practicals class/lab. You can not run them individually since there will not be “main()” function in those separate code segments.
You must be logged in to reply to this topic.
Discuss Through WhatsApp