<152 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld2.cpp~ helloworld.cpp
<153 xserver2:~/SS17/Work >rm helloworld2.cpp~
rm: remove regular file 'helloworld2.cpp~'? yes
<154 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld.cpp
<155 xserver2:~/SS17/Work >g++ -std=c++11 -Wall helloworld2.cpp
<156 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld.cpp
<157 xserver2:~/SS17/Work >./a.out
Hello World number 2!!
Jacob
HelloJacob!
<158 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld.cpp
<159 xserver2:~/SS17/Work >g++ -std=c++1 -Wall helloworld.cpp
g++: error: unrecognized command line option '-std=c++1'
<160 xserver2:~/SS17/Work >g++ -std=c++11 -Wall helloworld.cpp
<161 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld.cpp
<162 xserver2:~/SS17/Work >./a.out
Hello World !!<163 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld.cpp
./a.out
Hello World !!<163 xserver2:~/SS17/Work >ls
a.out helloworld2.cpp helloworld.cpp
In line 152, there is a duplicate file "helloworld2.cpp~", that has randomly appeared at some point during compilation. I do not know how it got there, however similar duplicate files in the format "filename.cpp~" seem to appear randomly when I attempt to compile .cpp files in directories where other .cpp files are present.
In line 153, I remove the duplicate file
In lines 154- 158, I compile and execute the first .cpp file, helloworld2.cpp in the directory "Work".
In Lines 159-162, I do the same to the second file helloworld.cpp
- No duplicate files in the format of "filename.cpp~" are created when I do this, so I am wondering what I am doing in my process that may have caused the creation of these files in the past, or an explanation of what these files are., Thank you!!
Aucun commentaire:
Enregistrer un commentaire