Advertisement
J2112O

C++ Errors

Feb 25th, 2015
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.13 KB | None | 0 0
  1. Below is my code
  2. #include "std_lib_facilities.h"
  3. int main()
  4. {
  5.     cout << "From my chair, get up and turn around facing south.\n";
  6.     cout << "Then walk down the hall for about 12 feet and stop.\n";
  7.     cout << "Then turn right and open the door.\n";
  8.     cout << "Walk in for about 6 feet and there is the throne.\n";
  9.     return 0;
  10. }
  11.  
  12. When I compile it I get this error
  13.  g++ ch2_exercise_part2.cpp -o ch2_exercise_part2
  14. In file included from /usr/include/c++/4.9/ext/hash_map:60:0,
  15.                  from std_lib_facilities.h:34,
  16.                  from ch2_exercise_part2.cpp:1:
  17. /usr/include/c++/4.9/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
  18.  #warning \
  19.   ^
  20. Yet when I run ./ch2_exercise_part2 it executes no problem with no errors and prints out all my text to the screen.
  21. So I checked the file /usr/include/c++/4.9/backward/backward_warning.h
  22. And found this
  23.  
  24.  A list of valid replacements is as follows:
  25.  
  26.   Use:                  Instead of:
  27.   <sstream>, basic_stringbuf        <strstream>, strstreambuf
  28.   <sstream>, basic_istringstream    <strstream>, istrstream
  29.   <sstream>, basic_ostringstream    <strstream>, ostrstream
  30.   <sstream>, basic_stringstream     <strstream>, strstream
  31.   <unordered_set>, unordered_set        <ext/hash_set>, hash_set
  32.   <unordered_set>, unordered_multiset   <ext/hash_set>, hash_multiset
  33.   <unordered_map>, unordered_map    <ext/hash_map>, hash_map
  34.   <unordered_map>, unordered_multimap   <ext/hash_map>, hash_multimap
  35.   <functional>, bind            <functional>, binder1st
  36.   <functional>, bind            <functional>, binder2nd
  37.   <functional>, bind            <functional>, bind1st
  38.   <functional>, bind            <functional>, bind2nd
  39.   <memory>, unique_ptr              <memory>, auto_ptr
  40.  
  41. I can't find what I need to replace in my code though with the above stuff.
  42. I am using Vim and Linux terminal to work with right now.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement