This question already has answers here:
Writing output files in different directory when many output files are being created
(1 answer)
Accessing files in sub directory of main program
(2 answers)
Closed 5 months ago.
I have this code, but trying to put output files in another directory. how do I solve this?
"
open(12,file='dt.ct',status='unknown')
open(14,file='event.dat',status='unknown')
open(15,file='event.sel',status='unknown')
...
write(*,'(/,a)')'Output files: dt.ct; event.dat; '//
& 'event.sel; ph2dt.log'
"
Related
This question already has answers here:
Why have header files and .cpp files? [closed]
(9 answers)
What should go into an .h file?
(12 answers)
Closed 11 months ago.
I'm learning C ++ and I have a question about header files. Are they only for classes? If I have some functions and want to use them in several files, should I write the declaration in the h file and the definition in the cpp file? Thanks for the help.
This question already has answers here:
Displaying the #include hierarchy for a C++ file in Visual Studio
(9 answers)
How To Get g++ to list paths to all #included files
(2 answers)
Closed 1 year ago.
Is there a way to list all files included in a generic .cpp file?
I need a list (flat) or a hierarchical tree that show all the included files from a .cpp file?
Does the compilator has some flag to show them? or using another tool? how can i achieve taht?
This question already has answers here:
What's an object file in C?
(5 answers)
Closed 2 years ago.
I got these console output while compilation via GCC.
Building CXX object xxxxxxx.cpp.obj
What are the .cpp.obj files? Are they the object file? Do the same as the .o file?
What is .c.obj / .cpp.obj file?
Object files created from compiling .c and .cpp files respectively.
What are the .cpp.obj files?
See above.
Are they the object file?
Yes.
Do the same as the .o file?
Yes.
Note that "extension" is just part of a filename and is customizable. You can name your file anything you want you want, it will not affect the content. In cmake see CMAKE_C_OUTPUT_EXTENSION.
This question already has answers here:
Why have header files and .cpp files? [closed]
(9 answers)
include header file in its own source file? [closed]
(1 answer)
Closed 4 years ago.
Why is there a need to include the header file of a class into the implementation file of the same class??
Does it serve a purpose??
Since i thought it is needed only where we need to use that class.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to add a default include path for gcc in linux?
I was wondering is it possible to compile together files from different locations if they are included in the code itself?
Lets say the header file is in another location but there is #include "header.h" in the cpp file.
I was looking for answer here on the site but the only thing I found was how to compile multiple files from the same location.
edit: I use g++ compiler on linux
You can put
#include "adress"
adress would be like C:/Users/Files.../header.h