Skip to content

Commit 798c25d

Browse files
committed
uniform comments style: //! and /// to //
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
1 parent ba0da07 commit 798c25d

File tree

155 files changed

+1544
-1544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+1544
-1544
lines changed

ch03/ex3_14.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
///
2-
///@Author @PEZY @Yue Wang
3-
///@Date Aug. 2014 Jun.2015
4-
///@Brief
5-
/// read a sequence of ints from cin and
6-
/// store those values in a vector.
7-
///
1+
//
2+
//@Author @PEZY @Yue Wang
3+
//@Date Aug. 2014 Jun.2015
4+
//@Brief
5+
// read a sequence of ints from cin and
6+
// store those values in a vector.
7+
//
88

99
#include <iostream>
1010
#include <vector>

ch03/ex3_15.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
///
2-
///@Author @PEZY @Yue Wang
3-
///@Date Aug. 2014, Jun 2015
4-
///@Brief
5-
/// read a sequence of strings from cin and
6-
/// store those values in a vector.
7-
///
1+
//
2+
//@Author @PEZY @Yue Wang
3+
//@Date Aug. 2014, Jun 2015
4+
//@Brief
5+
// read a sequence of strings from cin and
6+
// store those values in a vector.
7+
//
88

99
#include <iostream>
1010
#include <vector>

ch03/ex3_16.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
///
2-
///@Author PEZY
3-
///@Date Aug. 2014
4-
///@Brief
5-
/// print the size and contents of the vectors from exercise 3.13.
6-
/// Check whether your answers to that exercise were correct.
7-
/// If not, restudy § 3.3.1 (p. 97) until you understand why you were wrong.
8-
///
1+
//
2+
//@Author PEZY
3+
//@Date Aug. 2014
4+
//@Brief
5+
// print the size and contents of the vectors from exercise 3.13.
6+
// Check whether your answers to that exercise were correct.
7+
// If not, restudy § 3.3.1 (p. 97) until you understand why you were wrong.
8+
//
99

1010
#include <iostream>
1111
#include <vector>

ch03/ex3_17.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
///
2-
///@Author @PEZY @Yue Wang
3-
///@Date Aug. 2014 Jun.2015
4-
///@Brief
5-
/// Read a sequence of words from cin and store the values a vector.
6-
/// After you've read all the words, process the vector and change each word to uppercase.
7-
/// Print the transformed elements, eight words to a line.
8-
///
1+
//
2+
//@Author @PEZY @Yue Wang
3+
//@Date Aug. 2014 Jun.2015
4+
//@Brief
5+
// Read a sequence of words from cin and store the values a vector.
6+
// After you've read all the words, process the vector and change each word to uppercase.
7+
// Print the transformed elements, eight words to a line.
8+
//
99

1010
#include <iostream>
1111
#include <vector>

ch03/ex3_19.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
///
2-
///@Author @PEZY @Yue Wang
3-
///@Date Aug. 2014 Jun. 2015
4-
///@Brief
5-
/// List three ways to define a vector and give it ten elements,
6-
/// each with the value 42.
7-
/// Indicate whether there is a preferred way to do so and why.
1+
//
2+
//@Author @PEZY @Yue Wang
3+
//@Date Aug. 2014 Jun. 2015
4+
//@Brief
5+
// List three ways to define a vector and give it ten elements,
6+
// each with the value 42.
7+
// Indicate whether there is a preferred way to do so and why.
88

99
#include <iostream>
1010
#include <vector>

ch03/ex3_21.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
///
2-
///Redo the first exercise from § 3.3.3 (p. 105) using iterators.
3-
///
1+
//
2+
//Redo the first exercise from § 3.3.3 (p. 105) using iterators.
3+
//
44

55
#include <vector>
66
#include <iterator>

ch03/ex3_22.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
///
2-
///Revise the loop that printed the first paragraph in text
3-
///to instead change the elements in text that correspond
4-
///to the first paragraph to all uppercase.
5-
///After you’ve updated text, print its contents.
6-
///
1+
//
2+
//Revise the loop that printed the first paragraph in text
3+
//to instead change the elements in text that correspond
4+
//to the first paragraph to all uppercase.
5+
//After you’ve updated text, print its contents.
6+
//
77

88
#include <iostream>
99
#include <vector>

ch03/ex3_23.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
///
2-
///Write a program to create a vector with ten int elements.
3-
///Using an iterator, assign each element a value that is twice its current value.
4-
/// Test your program by printing the vector.
5-
///
1+
//
2+
//Write a program to create a vector with ten int elements.
3+
//Using an iterator, assign each element a value that is twice its current value.
4+
// Test your program by printing the vector.
5+
//
66

77
#include <vector>
88
#include <iostream>

ch06/ex6_10.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
//!@Yue wang
2-
//!
3-
//! Exercise 6.10:
4-
//! Using pointers, write a function to swap the values of two ints.
5-
//! Test the function by calling it and printing the swapped values.
6-
//!
1+
//@Yue wang
2+
//
3+
// Exercise 6.10:
4+
// Using pointers, write a function to swap the values of two ints.
5+
// Test the function by calling it and printing the swapped values.
6+
//
77
#include <iostream>
88
#include <string>
99
#include <stdexcept>

ch06/ex6_12.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
//!@Yue Wang
2-
//!
3-
//! Exercise 6.12:
4-
//! Rewrite the program from exercise 6.10 in § 6.2.1 (p. 210) to use
5-
//! references instead of pointers to swap the value of two ints. Which
6-
//! version do you think would be easier to use and why?
1+
//@Yue Wang
2+
//
3+
// Exercise 6.12:
4+
// Rewrite the program from exercise 6.10 in § 6.2.1 (p. 210) to use
5+
// references instead of pointers to swap the value of two ints. Which
6+
// version do you think would be easier to use and why?
77
// The version using reference is easier.
8-
//!
8+
//
99
#include <iostream>
1010
#include <string>
1111

ch06/ex6_21.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//! @Yue Wang
2-
//!
3-
//! Exercise 6.21:
4-
//! Write a function that takes an int and a pointer to an int and
5-
//! returns the larger of the int value or the value to which the
6-
//! pointer points. What type should you use for the pointer?
7-
//!
1+
// @Yue Wang
2+
//
3+
// Exercise 6.21:
4+
// Write a function that takes an int and a pointer to an int and
5+
// returns the larger of the int value or the value to which the
6+
// pointer points. What type should you use for the pointer?
7+
//
88

99
#include <iostream>
1010
using std::cout;

ch06/ex6_22.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//! @Yue Wang
2-
//!
3-
//! Exercise 6.22:
4-
//! Write a function to swap two int pointers.
5-
//!
1+
// @Yue Wang
2+
//
3+
// Exercise 6.22:
4+
// Write a function to swap two int pointers.
5+
//
66
#include <iostream>
77
#include <string>
88

ch06/ex6_25_26.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
//! @Yue Wang
2-
//!
3-
//! Exercise 6.25: Write a main function that takes two arguments.
4-
//! Concatenate the supplied arguments and print the resulting string.
5-
//!
6-
//! Exercise 6.26: Write a program that accepts the options presented
7-
//! in this section. Print the values of the arguments passed to main.
8-
//!
1+
// @Yue Wang
2+
//
3+
// Exercise 6.25: Write a main function that takes two arguments.
4+
// Concatenate the supplied arguments and print the resulting string.
5+
//
6+
// Exercise 6.26: Write a program that accepts the options presented
7+
// in this section. Print the values of the arguments passed to main.
8+
//
99

1010
#include <iostream>
1111
#include <string>

ch06/ex6_42.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//! @creator by Wang Yue
2-
//! @refactor by pezy
3-
//!
4-
//! @date 27, July. 2015
5-
//!
6-
//! @question
7-
//! Give the second parameter of make_plural (§ 6.3.2, p. 224) a default
8-
//! argument of 's'. Test your program by printing singular and plural versions
9-
//! of the words success and failure.
10-
//!
1+
// @creator by Wang Yue
2+
// @refactor by pezy
3+
//
4+
// @date 27, July. 2015
5+
//
6+
// @question
7+
// Give the second parameter of make_plural (§ 6.3.2, p. 224) a default
8+
// argument of 's'. Test your program by printing singular and plural versions
9+
// of the words success and failure.
10+
//
1111

1212
#include <iostream>
1313
#include <string>

ch06/ex6_44.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! @Yue Wang
2-
//!
3-
//! Exercise 6.44: Rewrite the isShorter function from § 6.2.2 (p. 211) to be inline.
4-
//!
1+
// @Yue Wang
2+
//
3+
// Exercise 6.44: Rewrite the isShorter function from § 6.2.2 (p. 211) to be inline.
4+
//
55
#include <iostream>
66
#include <string>
77
using std::string; using std::cout; using std::endl;

ch06/ex6_54_55_56.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
//! @Yue Wang
2-
//!
3-
//! Exercise 6.54:
4-
//! Write a declaration for a function that takes two int
5-
//! parameters and returns an int, and declare a vector whose
6-
//! elements have this function pointer type.
7-
//!
8-
//! Exercise 6.55:
9-
//! Write four functions that add, subtract, multiply, and divide
10-
//! two int values. Store pointers to these functions in your
11-
//! vector from the previous exercise.
12-
//!
13-
//! Exercise 6.56:
14-
//! Call each element in the vector and print their result.
15-
//!
1+
// @Yue Wang
2+
//
3+
// Exercise 6.54:
4+
// Write a declaration for a function that takes two int
5+
// parameters and returns an int, and declare a vector whose
6+
// elements have this function pointer type.
7+
//
8+
// Exercise 6.55:
9+
// Write four functions that add, subtract, multiply, and divide
10+
// two int values. Store pointers to these functions in your
11+
// vector from the previous exercise.
12+
//
13+
// Exercise 6.56:
14+
// Call each element in the vector and print their result.
15+
//
1616

1717
#include <iostream>
1818
#include <string>
1919
#include <vector>
2020
using std::vector; using std::cout;
2121

22-
//!
23-
//! @brief Exercise 6.54
24-
//! @note define the function type fp
25-
//!
22+
//
23+
// @brief Exercise 6.54
24+
// @note define the function type fp
25+
//
2626
inline int f(const int, const int);
2727
typedef decltype(f) fp;//fp is just a function type not a function pointer
2828

29-
//!
30-
//! @brief Exercise 6.55
31-
//! @note Store pointers to these functions in the vector
32-
//!
29+
//
30+
// @brief Exercise 6.55
31+
// @note Store pointers to these functions in the vector
32+
//
3333
inline int NumAdd(const int n1, const int n2) { return n1 + n2; }
3434
inline int NumSub(const int n1, const int n2) { return n1 - n2; }
3535
inline int NumMul(const int n1, const int n2) { return n1 * n2; }

ch09/ex9_13.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//! @author @shbling @Yue Wang
2-
//!
3-
//! Exercise 9.13:
4-
//! How would you initialize a vector<double> from a list<int>?
5-
//! From a vector<int>?
6-
//! Write code to check your answers.
7-
//!
1+
// @author @shbling @Yue Wang
2+
//
3+
// Exercise 9.13:
4+
// How would you initialize a vector<double> from a list<int>?
5+
// From a vector<int>?
6+
// Write code to check your answers.
7+
//
88
#include <iostream>
99
#include <string>
1010
#include <vector>

ch09/ex9_14.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
//! @Yue Wang @pezy
2-
//!
3-
//! Exercise 9.14:
4-
//! Write a program to assign the elements from a list of char* pointers
5-
//! to C-style character strings
6-
//!
7-
//! @Notice C-style character strings should use const char*, otherwise warning.
8-
//!
1+
// @Yue Wang @pezy
2+
//
3+
// Exercise 9.14:
4+
// Write a program to assign the elements from a list of char* pointers
5+
// to C-style character strings
6+
//
7+
// @Notice C-style character strings should use const char*, otherwise warning.
8+
//
99

1010
#include <iostream>
1111
#include <string>

ch09/ex9_24.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
//! @Yue Wang @pezy
2-
//!
3-
//! Exercise 9.24:
4-
//! Write a program that fetches the first element in a vector using at,
5-
//! the subscript operator, front, and begin. Test your program on an empty vector.
6-
//!
1+
// @Yue Wang @pezy
2+
//
3+
// Exercise 9.24:
4+
// Write a program that fetches the first element in a vector using at,
5+
// the subscript operator, front, and begin. Test your program on an empty vector.
6+
//
77
#include <iostream>
88
#include <vector>
99

ch09/ex9_26.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//!
2-
//! @author @huangjuncmj @Yue Wang
3-
//! @date 19.11.2014
4-
//!
5-
//! Exercise 9.26:
6-
//! Using the following definition of ia, copy ia into a vector and into a list.
7-
//! Use the single-iterator form of erase to remove the elements with odd values from your
8-
//! list and the even values from your vector.
9-
//!
1+
//
2+
// @author @huangjuncmj @Yue Wang
3+
// @date 19.11.2014
4+
//
5+
// Exercise 9.26:
6+
// Using the following definition of ia, copy ia into a vector and into a list.
7+
// Use the single-iterator form of erase to remove the elements with odd values from your
8+
// list and the even values from your vector.
9+
//
1010
#include <iostream>
1111
#include <vector>
1212
#include <list>

0 commit comments

Comments
 (0)