Website Summary Files Commits Branches @commit @diff @stats
path: root / Big4 / InformaticsStudent.cpp
diff options
context:
space:
mode:
Commitd0f88b3bc3d89d52aa1f2c27507eaf0d76f2a703 (patch)
Author
 Angeld55 <achi_d@abv.bg>
2019-09-23 23:47:50 +0300
Committer
 GitHub <noreply@github.com>
2019-09-23 23:47:50 +0300
Filesc2c08980b37021ae498665626b39ca1b64b9a092 /Big4/InformaticsStudent.cpp
Object-oriented_programming_FMI-d0f88b3bc3d89d52aa1f2c27507eaf0d76f2a703.tar
Object-oriented_programming_FMI-d0f88b3bc3d89d52aa1f2c27507eaf0d76f2a703.tar.gz
Object-oriented_programming_FMI-d0f88b3bc3d89d52aa1f2c27507eaf0d76f2a703.zip
Parentf9492501612d20041cb0903f0a673793a977aa91 (diff)
Add files via upload
1 files changed, 13 insertions, 2 deletions
-rw-r--r--Big4/InformaticsStudent.cpp15
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;
}