Guest User

Untitled

a guest
Dec 4th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. Hello Ms. Stringfellow,
  2.  
  3. I have noticed an unusual number of questions on StackOverflow.com embedding homework assignments that may encourage poor C++ style. Please consider adopting style such as
  4.  
  5. http://www-bcf.usc.edu/~dkempe/CS104/coding-guide.pdf
  6. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
  7. http://stackoverflow.com/questions/2434213/links-to-official-style-guides
  8.  
  9. In particular,
  10.  
  11. #pragma once is nonstandard and may not scale well for build systems spread over a network.
  12. using namespace std; within a header exposes clients of the header to name collisions with the standard library, which is quite large and ever-expanding.
  13. Inclusion of an implementation file from an interface file obscures the structure of a program.
  14. If separate interface and implementation files are desired for a template, it is better to supply the user with both a foo_fwd.h forward-declaration and foo.hpp implementation file. The implementation would include its own forward declaration. (For example, <iostream> works like this.)
  15. A .cpp file should never be the subject of a #include.
  16.  
  17.  
  18. Thanks for your preference of C++ and taking the time to teach templates.
  19.  
  20. Sorry if this message is in error, but you appear to be the one teaching the class in question.
  21.  
  22. You might talk to your students about StackOverflow. The site does not discourage homework help, but it could run afoul of plagiarism policy or personal standards. You could request a tag for issues regarding your class at meta.stackoverflow.com; students could apply this to their questions to simplify the process of monitoring the discussion.
  23.  
  24. - Best wishes,
  25. David
Advertisement
Add Comment
Please, Sign In to add comment