Code Example - explicit keyword
example of the explicit keyword.
AI
ملخص الذكاء الاصطناعي: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
كود المصدر
/* Example of the explicit keyword
written by Jared Bruni
www.LostSideDead.com
*/
#include<iostream>
class String
{
private:
char *str;
public:
explicit String(int n);
String();
~String();
};
String::String()
{
str = NULL;
}
String::String(int n)
{
str = new char [ n + 1 ];
}
String::~String()
{
if(str != NULL)
{
delete [] str;
str = NULL;
}
}
int main()
{
String str(100);
return (0);
}
التعليقات الأصلية (3)
مسترجع من Wayback Machine