aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/visibility17.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility17.C12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
index fa4d6db69b9..2aa08a09169 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
@@ -5,8 +5,8 @@
// Date: Thu, 05 Aug 1993 17:23:20 -0700
// Subject: Access to private constructor.
// Message-ID: <9308060023.AA10283@neptune.caere.com>
-#include <iostream.h>
-#include <string.h>
+#include <iostream>
+#include <cstring>
class Base
{
@@ -33,13 +33,13 @@ private:
Base::Base()
{ // ERROR - private
- name_ = strcpy(new char[strlen(" ") + 1], " ");
+ name_ = std::strcpy(new char[std::strlen(" ") + 1], " ");
}
Base::Base(char* str)
{ // ERROR - private
if(str != NULL)
- name_ = strcpy(new char[strlen(str) + 1], str);
+ name_ = std::strcpy(new char[std::strlen(str) + 1], str);
}
Derived::Derived(int n, char* str) : Base(str)
@@ -59,6 +59,8 @@ int main()
// Derived* d = new Derived(10, "test");
Derived* d = new Derived(10);
- cerr << d->getNum() << "\t" << d->getName() << endl;
+ std::cerr << d->getNum() << "\t" << d->getName() << std::endl;
}
+
+