Skip to content

Commit

Permalink
uniform comments style: //! and /// to //
Browse files Browse the repository at this point in the history
	modified:   ../ch03/ex3_14.cpp
	modified:   ../ch03/ex3_15.cpp
	modified:   ../ch03/ex3_16.cpp
	modified:   ../ch03/ex3_17.cpp
	modified:   ../ch03/ex3_19.cpp
	modified:   ../ch03/ex3_21.cpp
	modified:   ../ch03/ex3_22.cpp
	modified:   ../ch03/ex3_23.cpp
	modified:   ../ch06/ex6_10.cpp
	modified:   ../ch06/ex6_12.cpp
	modified:   ../ch06/ex6_21.cpp
	modified:   ../ch06/ex6_22.cpp
	modified:   ../ch06/ex6_25_26.cpp
	modified:   ../ch06/ex6_42.cpp
	modified:   ../ch06/ex6_44.cpp
	modified:   ../ch06/ex6_54_55_56.cpp
	modified:   ../ch09/ex9_13.cpp
	modified:   ../ch09/ex9_14.cpp
	modified:   ../ch09/ex9_24.cpp
	modified:   ../ch09/ex9_26.cpp
	modified:   ../ch09/ex9_38.cpp
	modified:   ../ch09/ex9_45.cpp
	modified:   ../ch09/ex9_50.cpp
	modified:   ../ch09/ex9_51.cpp
	modified:   ../ch10/ex10_01_02.cpp
	modified:   ../ch10/ex10_03_04.cpp
	modified:   ../ch10/ex10_09.cpp
	modified:   ../ch10/ex10_11.cpp
	modified:   ../ch10/ex10_12.cpp
	modified:   ../ch10/ex10_13.cpp
	modified:   ../ch10/ex10_16.cpp
	modified:   ../ch10/ex10_17.cpp
	modified:   ../ch10/ex10_18_19.cpp
	modified:   ../ch10/ex10_20_21.cpp
	modified:   ../ch10/ex10_24.cpp
	modified:   ../ch10/ex10_34_35_36_37.cpp
	modified:   ../ch10/ex10_42.cpp
	modified:   ../ch11/ex11_14.cpp
	modified:   ../ch11/ex11_18.cpp
	modified:   ../ch11/ex11_20.cpp
	modified:   ../ch11/ex11_24_25_26.cpp
	modified:   ../ch11/ex11_27_28_29_30.cpp
	modified:   ../ch11/ex11_3_4.cpp
	modified:   ../ch11/ex11_7.cpp
	modified:   ../ch11/ex11_8.cpp
	modified:   ../ch11/ex11_9_10.cpp
	modified:   ../ch12/ex12_06.cpp
	modified:   ../ch12/ex12_07.cpp
	modified:   ../ch12/ex12_10.cpp
	modified:   ../ch12/ex12_11.cpp
	modified:   ../ch12/ex12_12.cpp
	modified:   ../ch12/ex12_13.cpp
	modified:   ../ch12/ex12_17_18.cpp
	modified:   ../ch14/ex14_24.cpp
	modified:   ../ch14/ex14_24.h
	modified:   ../ch14/ex14_24_TEST.cpp
	modified:   ../ch14/ex14_38_39.cpp
	modified:   ../ch14/ex14_43.cpp
	modified:   ../ch14/ex14_44.cpp
	modified:   ../ch14/ex14_49.cpp
	modified:   ../ch14/ex14_49.h
	modified:   ../ch15/ex15.1.2.3/main.cpp
	modified:   ../ch15/ex15.11/main.cpp
	modified:   ../ch15/ex15.12.13.14/main.cpp
	modified:   ../ch15/ex15.15.16.17/main.cpp
	modified:   ../ch15/ex15.18.19.20/main.cpp
	modified:   ../ch15/ex15.21.22/main.cpp
	modified:   ../ch15/ex15.23.cpp
	modified:   ../ch15/ex15.24.25.cpp
	modified:   ../ch15/ex15.26/main.cpp
	modified:   ../ch15/ex15.27/main.cpp
	modified:   ../ch15/ex15.28.29/main.cpp
	modified:   ../ch15/ex15.30/basket.h
	modified:   ../ch15/ex15.30/main.cpp
	modified:   ../ch15/ex15.30/quote.cpp
	modified:   ../ch15/ex15.30/quote.h
	modified:   ../ch15/ex15.31.32.33.cpp
	modified:   ../ch15/ex15.34.35.36.38/main.cpp
	modified:   ../ch15/ex15.34.35.36.38/queryresult.h
	modified:   ../ch15/ex15.34.35.36.38/textquery.cpp
	modified:   ../ch15/ex15.34.35.36.38/textquery.h
	modified:   ../ch15/ex15.39.40/main.cpp
	modified:   ../ch15/ex15.39.40/queryresult.h
	modified:   ../ch15/ex15.39.40/textquery.cpp
	modified:   ../ch15/ex15.39.40/textquery.h
	modified:   ../ch15/ex15.4.5.6/main.cpp
	modified:   ../ch15/ex15.7/main.cpp
	modified:   ../ch15/ex15.8.9.10/ex15.8.9.10.cpp
	modified:   ../ch16/ex16.1.2.3/main.cpp
	modified:   ../ch16/ex16.12.13/Blob.h
	modified:   ../ch16/ex16.12.13/blobptr.h
	modified:   ../ch16/ex16.12.13/main.cpp
	modified:   ../ch16/ex16.14.15/Screen.h
	modified:   ../ch16/ex16.14.15/main.cpp
	modified:   ../ch16/ex16.16/main.cpp
	modified:   ../ch16/ex16.16/vec.h
	modified:   ../ch16/ex16.17.18/main.cpp
	modified:   ../ch16/ex16.19.20/main.cpp
	modified:   ../ch16/ex16.21.22/main.cpp
	modified:   ../ch16/ex16.21.22/wy_queryresult.cpp
	modified:   ../ch16/ex16.21.22/wy_queryresult.h
	modified:   ../ch16/ex16.21.22/wy_textquery.cpp
	modified:   ../ch16/ex16.21.22/wy_textquery.h
	modified:   ../ch16/ex16.24/Blob.h
	modified:   ../ch16/ex16.24/blobptr.h
	modified:   ../ch16/ex16.24/main.cpp
	modified:   ../ch16/ex16.25.26/main.cpp
	modified:   ../ch16/ex16.28/main.cpp
	modified:   ../ch16/ex16.28/unique_pointer.h
	modified:   ../ch16/ex16.29/Blob.h
	modified:   ../ch16/ex16.29/main.cpp
	modified:   ../ch16/ex16.29/shared_pointer.h
	modified:   ../ch16/ex16.29/unique_pointer.h
	modified:   ../ch16/ex16.32.33.34.35.36/main.cpp
	modified:   ../ch16/ex16.37.38.39/main.cpp
	modified:   ../ch16/ex16.4/main.cpp
	modified:   ../ch16/ex16.40/main.cpp
	modified:   ../ch16/ex16.41/main.cpp
	modified:   ../ch16/ex16.42.43.44.45.46/main.cpp
	modified:   ../ch16/ex16.47/main.cpp
	modified:   ../ch16/ex16.48/main.cpp
	modified:   ../ch16/ex16.49.50/main.cpp
	modified:   ../ch16/ex16.5/main.cpp
	modified:   ../ch16/ex16.51.52/main.cpp
	modified:   ../ch16/ex16.53.54.55/main.cpp
	modified:   ../ch16/ex16.56.57/main.cpp
	modified:   ../ch16/ex16.58.59/strvec.cpp
	modified:   ../ch16/ex16.58.59/strvec.h
	modified:   ../ch16/ex16.58.59/vec.h
	modified:   ../ch16/ex16.6/main.cpp
	modified:   ../ch16/ex16.60.61/main.cpp
	modified:   ../ch16/ex16.62/Sales_data.h
	modified:   ../ch16/ex16.62/main.cpp
	modified:   ../ch16/ex16.63.64/main.cpp
	modified:   ../ch16/ex16.65.66.67/main.cpp
	modified:   ../ch16/ex16.7.8/main.cpp
	modified:   ../ch16/ex16.9.10.11/main.cpp
	modified:   ../ch17/ex17.3/main.cpp
	modified:   ../ch17/ex17.3/textquery.cpp
	modified:   ../ch17/ex17_10.cpp
	modified:   ../ch17/ex17_11_12_13.cpp
	modified:   ../ch17/ex17_14_15_16.cpp
	modified:   ../ch17/ex17_17_18.cpp
	modified:   ../ch17/ex17_19_20.cpp
	modified:   ../ch17/ex17_1_2.cpp
	modified:   ../ch17/ex17_21.cpp
	modified:   ../ch17/ex17_23.cpp
	modified:   ../ch17/ex17_28_29_30.cpp
	modified:   ../ch17/ex17_4_5_6_7_8.cpp
	modified:   ../ch17/ex17_4_5_6_7_8_SalesData.cpp
	modified:   ../ch17/ex17_4_5_6_7_8_SalesData.h
	modified:   ../ch17/ex17_9.cpp
	modified:   ../ch18/ex18.1.2.3.cpp
	modified:   ../ch18/ex18.12.13.14.cpp
	modified:   ../ch18/ex18.15.16.17.cpp

 Untracked files:
	uniform_comments_mark.rb
  • Loading branch information
Mooophy committed Aug 25, 2015
1 parent ba0da07 commit 798c25d
Show file tree
Hide file tree
Showing 155 changed files with 1,544 additions and 1,544 deletions.
14 changes: 7 additions & 7 deletions ch03/ex3_14.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
///
///@Author @PEZY @Yue Wang
///@Date Aug. 2014 Jun.2015
///@Brief
/// read a sequence of ints from cin and
/// store those values in a vector.
///
//
//@Author @PEZY @Yue Wang
//@Date Aug. 2014 Jun.2015
//@Brief
// read a sequence of ints from cin and
// store those values in a vector.
//

#include <iostream>
#include <vector>
Expand Down
14 changes: 7 additions & 7 deletions ch03/ex3_15.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
///
///@Author @PEZY @Yue Wang
///@Date Aug. 2014, Jun 2015
///@Brief
/// read a sequence of strings from cin and
/// store those values in a vector.
///
//
//@Author @PEZY @Yue Wang
//@Date Aug. 2014, Jun 2015
//@Brief
// read a sequence of strings from cin and
// store those values in a vector.
//

#include <iostream>
#include <vector>
Expand Down
16 changes: 8 additions & 8 deletions ch03/ex3_16.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
///
///@Author PEZY
///@Date Aug. 2014
///@Brief
/// print the size and contents of the vectors from exercise 3.13.
/// Check whether your answers to that exercise were correct.
/// If not, restudy § 3.3.1 (p. 97) until you understand why you were wrong.
///
//
//@Author PEZY
//@Date Aug. 2014
//@Brief
// print the size and contents of the vectors from exercise 3.13.
// Check whether your answers to that exercise were correct.
// If not, restudy § 3.3.1 (p. 97) until you understand why you were wrong.
//

#include <iostream>
#include <vector>
Expand Down
16 changes: 8 additions & 8 deletions ch03/ex3_17.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
///
///@Author @PEZY @Yue Wang
///@Date Aug. 2014 Jun.2015
///@Brief
/// Read a sequence of words from cin and store the values a vector.
/// After you've read all the words, process the vector and change each word to uppercase.
/// Print the transformed elements, eight words to a line.
///
//
//@Author @PEZY @Yue Wang
//@Date Aug. 2014 Jun.2015
//@Brief
// Read a sequence of words from cin and store the values a vector.
// After you've read all the words, process the vector and change each word to uppercase.
// Print the transformed elements, eight words to a line.
//

#include <iostream>
#include <vector>
Expand Down
14 changes: 7 additions & 7 deletions ch03/ex3_19.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
///
///@Author @PEZY @Yue Wang
///@Date Aug. 2014 Jun. 2015
///@Brief
/// List three ways to define a vector and give it ten elements,
/// each with the value 42.
/// Indicate whether there is a preferred way to do so and why.
//
//@Author @PEZY @Yue Wang
//@Date Aug. 2014 Jun. 2015
//@Brief
// List three ways to define a vector and give it ten elements,
// each with the value 42.
// Indicate whether there is a preferred way to do so and why.

#include <iostream>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions ch03/ex3_21.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///
///Redo the first exercise from § 3.3.3 (p. 105) using iterators.
///
//
//Redo the first exercise from § 3.3.3 (p. 105) using iterators.
//

#include <vector>
#include <iterator>
Expand Down
12 changes: 6 additions & 6 deletions ch03/ex3_22.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
///
///Revise the loop that printed the first paragraph in text
///to instead change the elements in text that correspond
///to the first paragraph to all uppercase.
///After you’ve updated text, print its contents.
///
//
//Revise the loop that printed the first paragraph in text
//to instead change the elements in text that correspond
//to the first paragraph to all uppercase.
//After you’ve updated text, print its contents.
//

#include <iostream>
#include <vector>
Expand Down
10 changes: 5 additions & 5 deletions ch03/ex3_23.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
///
///Write a program to create a vector with ten int elements.
///Using an iterator, assign each element a value that is twice its current value.
/// Test your program by printing the vector.
///
//
//Write a program to create a vector with ten int elements.
//Using an iterator, assign each element a value that is twice its current value.
// Test your program by printing the vector.
//

#include <vector>
#include <iostream>
Expand Down
12 changes: 6 additions & 6 deletions ch06/ex6_10.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//!@Yue wang
//!
//! Exercise 6.10:
//! Using pointers, write a function to swap the values of two ints.
//! Test the function by calling it and printing the swapped values.
//!
//@Yue wang
//
// Exercise 6.10:
// Using pointers, write a function to swap the values of two ints.
// Test the function by calling it and printing the swapped values.
//
#include <iostream>
#include <string>
#include <stdexcept>
Expand Down
14 changes: 7 additions & 7 deletions ch06/ex6_12.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//!@Yue Wang
//!
//! Exercise 6.12:
//! Rewrite the program from exercise 6.10 in § 6.2.1 (p. 210) to use
//! references instead of pointers to swap the value of two ints. Which
//! version do you think would be easier to use and why?
//@Yue Wang
//
// Exercise 6.12:
// Rewrite the program from exercise 6.10 in § 6.2.1 (p. 210) to use
// references instead of pointers to swap the value of two ints. Which
// version do you think would be easier to use and why?
// The version using reference is easier.
//!
//
#include <iostream>
#include <string>

Expand Down
14 changes: 7 additions & 7 deletions ch06/ex6_21.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! @Yue Wang
//!
//! Exercise 6.21:
//! Write a function that takes an int and a pointer to an int and
//! returns the larger of the int value or the value to which the
//! pointer points. What type should you use for the pointer?
//!
// @Yue Wang
//
// Exercise 6.21:
// Write a function that takes an int and a pointer to an int and
// returns the larger of the int value or the value to which the
// pointer points. What type should you use for the pointer?
//

#include <iostream>
using std::cout;
Expand Down
10 changes: 5 additions & 5 deletions ch06/ex6_22.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! @Yue Wang
//!
//! Exercise 6.22:
//! Write a function to swap two int pointers.
//!
// @Yue Wang
//
// Exercise 6.22:
// Write a function to swap two int pointers.
//
#include <iostream>
#include <string>

Expand Down
16 changes: 8 additions & 8 deletions ch06/ex6_25_26.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! @Yue Wang
//!
//! Exercise 6.25: Write a main function that takes two arguments.
//! Concatenate the supplied arguments and print the resulting string.
//!
//! Exercise 6.26: Write a program that accepts the options presented
//! in this section. Print the values of the arguments passed to main.
//!
// @Yue Wang
//
// Exercise 6.25: Write a main function that takes two arguments.
// Concatenate the supplied arguments and print the resulting string.
//
// Exercise 6.26: Write a program that accepts the options presented
// in this section. Print the values of the arguments passed to main.
//

#include <iostream>
#include <string>
Expand Down
20 changes: 10 additions & 10 deletions ch06/ex6_42.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//! @creator by Wang Yue
//! @refactor by pezy
//!
//! @date 27, July. 2015
//!
//! @question
//! Give the second parameter of make_plural (§ 6.3.2, p. 224) a default
//! argument of 's'. Test your program by printing singular and plural versions
//! of the words success and failure.
//!
// @creator by Wang Yue
// @refactor by pezy
//
// @date 27, July. 2015
//
// @question
// Give the second parameter of make_plural (§ 6.3.2, p. 224) a default
// argument of 's'. Test your program by printing singular and plural versions
// of the words success and failure.
//

#include <iostream>
#include <string>
Expand Down
8 changes: 4 additions & 4 deletions ch06/ex6_44.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! @Yue Wang
//!
//! Exercise 6.44: Rewrite the isShorter function from § 6.2.2 (p. 211) to be inline.
//!
// @Yue Wang
//
// Exercise 6.44: Rewrite the isShorter function from § 6.2.2 (p. 211) to be inline.
//
#include <iostream>
#include <string>
using std::string; using std::cout; using std::endl;
Expand Down
46 changes: 23 additions & 23 deletions ch06/ex6_54_55_56.cpp
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
//! @Yue Wang
//!
//! Exercise 6.54:
//! Write a declaration for a function that takes two int
//! parameters and returns an int, and declare a vector whose
//! elements have this function pointer type.
//!
//! Exercise 6.55:
//! Write four functions that add, subtract, multiply, and divide
//! two int values. Store pointers to these functions in your
//! vector from the previous exercise.
//!
//! Exercise 6.56:
//! Call each element in the vector and print their result.
//!
// @Yue Wang
//
// Exercise 6.54:
// Write a declaration for a function that takes two int
// parameters and returns an int, and declare a vector whose
// elements have this function pointer type.
//
// Exercise 6.55:
// Write four functions that add, subtract, multiply, and divide
// two int values. Store pointers to these functions in your
// vector from the previous exercise.
//
// Exercise 6.56:
// Call each element in the vector and print their result.
//

#include <iostream>
#include <string>
#include <vector>
using std::vector; using std::cout;

//!
//! @brief Exercise 6.54
//! @note define the function type fp
//!
//
// @brief Exercise 6.54
// @note define the function type fp
//
inline int f(const int, const int);
typedef decltype(f) fp;//fp is just a function type not a function pointer

//!
//! @brief Exercise 6.55
//! @note Store pointers to these functions in the vector
//!
//
// @brief Exercise 6.55
// @note Store pointers to these functions in the vector
//
inline int NumAdd(const int n1, const int n2) { return n1 + n2; }
inline int NumSub(const int n1, const int n2) { return n1 - n2; }
inline int NumMul(const int n1, const int n2) { return n1 * n2; }
Expand Down
14 changes: 7 additions & 7 deletions ch09/ex9_13.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! @author @shbling @Yue Wang
//!
//! Exercise 9.13:
//! How would you initialize a vector<double> from a list<int>?
//! From a vector<int>?
//! Write code to check your answers.
//!
// @author @shbling @Yue Wang
//
// Exercise 9.13:
// How would you initialize a vector<double> from a list<int>?
// From a vector<int>?
// Write code to check your answers.
//
#include <iostream>
#include <string>
#include <vector>
Expand Down
16 changes: 8 additions & 8 deletions ch09/ex9_14.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! @Yue Wang @pezy
//!
//! Exercise 9.14:
//! Write a program to assign the elements from a list of char* pointers
//! to C-style character strings
//!
//! @Notice C-style character strings should use const char*, otherwise warning.
//!
// @Yue Wang @pezy
//
// Exercise 9.14:
// Write a program to assign the elements from a list of char* pointers
// to C-style character strings
//
// @Notice C-style character strings should use const char*, otherwise warning.
//

#include <iostream>
#include <string>
Expand Down
12 changes: 6 additions & 6 deletions ch09/ex9_24.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! @Yue Wang @pezy
//!
//! Exercise 9.24:
//! Write a program that fetches the first element in a vector using at,
//! the subscript operator, front, and begin. Test your program on an empty vector.
//!
// @Yue Wang @pezy
//
// Exercise 9.24:
// Write a program that fetches the first element in a vector using at,
// the subscript operator, front, and begin. Test your program on an empty vector.
//
#include <iostream>
#include <vector>

Expand Down
18 changes: 9 additions & 9 deletions ch09/ex9_26.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//!
//! @author @huangjuncmj @Yue Wang
//! @date 19.11.2014
//!
//! Exercise 9.26:
//! Using the following definition of ia, copy ia into a vector and into a list.
//! Use the single-iterator form of erase to remove the elements with odd values from your
//! list and the even values from your vector.
//!
//
// @author @huangjuncmj @Yue Wang
// @date 19.11.2014
//
// Exercise 9.26:
// Using the following definition of ia, copy ia into a vector and into a list.
// Use the single-iterator form of erase to remove the elements with odd values from your
// list and the even values from your vector.
//
#include <iostream>
#include <vector>
#include <list>
Expand Down
Loading

0 comments on commit 798c25d

Please sign in to comment.