diff options
Add files via upload
1 files changed, 13 insertions, 2 deletions
| -rw-r--r-- | Big4/InformaticsStudent.cpp | 15 |
diff --git a/Big4/InformaticsStudent.cpp b/Big4/InformaticsStudent.cpp index f158e7f..6c69f4e 100644 --- a/Big4/InformaticsStudent.cpp +++ b/Big4/InformaticsStudent.cpp @@ -1,6 +1,17 @@ #include "InformaticsStudent.h" +#include <cstring> +bool hasDigits(const char* str,int len) +{ + for (int i = 0; i < len;i++) + { + if (str[i] >= '0' && str[i] <= '9') + return true; + } + return false; +} + void InformaticsStudent::CopyFrom(const InformaticsStudent& other) { int len = strlen(other.name); @@ -85,7 +96,7 @@ int InformaticsStudent::getFn() const return fn; } -void InformaticsStudent::printStudent() +void InformaticsStudent::printStudent() const { - cout << name << " fn: " << fn << endl; + std::cout << name << " fn: " << fn << std::endl; } |
