Skip to content

Commit

Permalink
added CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy committed Jun 24, 2015
1 parent 4bc1138 commit 69c45fc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to CppPrimer

Please ensure your pull request adheres to the following guidelines:

1. No tabs, Use only spaces, and indent **4 space** at a time.
2. No `using namespace std;`
3. Put **spaces** after each **semicolon**, around **operators**.
```cpp
for(auto i=0;i!=size;++i) // Bad
for (auto i = 0; i != size; ++i) // Good
auto epsilon=2*gamma-delta*pi; // Bad
auto epsilon = 2 * gamma - delta * pi; // Good
```
4. Put **braces** to next line in function(such as `main()`), **otherwise, End of line**.
```cpp
int main()
{
Sales_item total;
if (std::cin >> total) {
Sales_item trans;
while (std::cin >> trans) {
//...
}
}
}
```

Thank you for your suggestions!

#### Tips for good commits and issues.

1. Read up on [Github Flavored Markdown](https://help.github.com/articles/github-flavored-markdown)
2. [Closing Issues via Commit Messages](https://github.com/tiimgreen/github-cheat-sheet#closing-issues-via-commit-messages) is encouraged.
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
##C++ Primer 5 Answers
##C++ Primer 5th Answers

[![GitHub issues](https://img.shields.io/github/issues/Mooophy/Cpp-Primer.svg)](https://github.com/Mooophy/Cpp-Primer/issues)
[![GitHub license](https://img.shields.io/badge/license-CC0-blue.svg)](https://raw.githubusercontent.com/Mooophy/Cpp-Primer/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/Mooophy/Cpp-Primer.svg)](https://github.com/pezy/CppPrimer/issues)
[![GitHub license](https://img.shields.io/badge/license-CC0-blue.svg)](https://raw.githubusercontent.com/pezy/Cpp-Primer/master/LICENSE)
[![](https://img.shields.io/badge/%E4%B8%AD%E6%96%87-%E8%AE%A8%E8%AE%BA%E5%8C%BA-yellowgreen.svg)](https://github.com/ReadingLab/Discussion-for-Cpp)
[![](https://img.shields.io/badge/douban-%E5%B0%8F%E7%BB%84-green.svg)](http://www.douban.com/group/532124/)

### Note
### Notes

- Use `-std=c++11`(optional: `-pedantic -Wall`) flag when compiling.(or you can use Visual Studio 2012+)
- If you found any bug, please [let me know](https://github.com/Mooophy/Cpp-Primer/issues/new), thanks.
- I have downloaded the headers from this book's [web site](http://www.informit.com/store/c-plus-plus-primer-9780321714114) and put them in the `include` folder.
- In order to test the program in an efficient way, I also put the test data file in the `data` folder.

### How to contribute

- Please **fork**([How?](https://help.github.com/articles/fork-a-repo)) this repository first.
- **Commit**([How?](https://help.github.com/articles/create-a-repo#commit-your-first-change)) in your own repository.
- Give me a **pull request**([How?](https://help.github.com/articles/using-pull-requests)).
- **Syncing** with([How?](https://help.github.com/articles/syncing-a-fork/)) the origin repository. This is very **important** because this repo updates frequently.
- **g++** and **clang++** are recommended. Visual Studio 2013 may be used as well, but up to June 2015, Visual Studio has not implemented all c++11 features yet.
- Use `-std=c++11`(recommend: `-pedantic -Wall`) flag for compiling.
- If any bug caught, please [let me know](https://github.com/pezy/Cpp-Primer/issues/new), thanks.

### Contents

Expand Down

0 comments on commit 69c45fc

Please sign in to comment.