文件名称:StringOverLoading
介绍说明--下载内容均来自于网络,请自行研究使用
运算符重载
任务目标:
学习C++的运算符函数重载机制,并学习C++的。
任务描述:
设计一个字符串类MyString,要求该类能够完成以下操作(用函数重载机制完成)。要求构造完整的类(包括构造、析构函数),并且实现其他以下功能
String1=String2+String3 (重载+)
String1 += String2 (重载+=)
(int)String1 (重载类型转换int),将String对象中的所有字符的ASCII相加后返回。
String1 == String2 (重载相等判断,两字符串相等返回真,不等返回假)
cout << String1 (输出符号重载)
cin >> String1 (输入符号重载)
编写测试程序测试该类。-Operator Overloading mission objectives: learning C++ operator function overloading mechanism, and learn C++' s. Task Descr iption: Design a string class MyString, asked the class to complete the following (using function overloading mechanism is completed). Structural integrity requirements of the class (including the structure, the destructor), and achieve other following functions String1 = String2+String3 (overloaded+) String1+ = String2 (overloaded+ =) (int) String1 (heavy duty type conversion int), the String object to return after all ASCII characters added. String1 == String2 (overloaded equal judgment, two strings are equal returns true, unequal returns false) cout < < String1 (output symbol overloading) cin > > String1 (input symbols reload) the preparation of test procedures to test the class.
任务目标:
学习C++的运算符函数重载机制,并学习C++的。
任务描述:
设计一个字符串类MyString,要求该类能够完成以下操作(用函数重载机制完成)。要求构造完整的类(包括构造、析构函数),并且实现其他以下功能
String1=String2+String3 (重载+)
String1 += String2 (重载+=)
(int)String1 (重载类型转换int),将String对象中的所有字符的ASCII相加后返回。
String1 == String2 (重载相等判断,两字符串相等返回真,不等返回假)
cout << String1 (输出符号重载)
cin >> String1 (输入符号重载)
编写测试程序测试该类。-Operator Overloading mission objectives: learning C++ operator function overloading mechanism, and learn C++' s. Task Descr iption: Design a string class MyString, asked the class to complete the following (using function overloading mechanism is completed). Structural integrity requirements of the class (including the structure, the destructor), and achieve other following functions String1 = String2+String3 (overloaded+) String1+ = String2 (overloaded+ =) (int) String1 (heavy duty type conversion int), the String object to return after all ASCII characters added. String1 == String2 (overloaded equal judgment, two strings are equal returns true, unequal returns false) cout < < String1 (output symbol overloading) cin > > String1 (input symbols reload) the preparation of test procedures to test the class.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
StringOverLoading
.................\StringOverLoading
.................\.................\Debug
.................\.................\.....\StringOverLoading.exe
.................\.................\.....\StringOverLoading.ilk
.................\.................\.....\StringOverLoading.pdb
.................\.................\ipch
.................\.................\....\stringoverloading-8d976840
.................\.................\....\..........................\stringoverloading-30935bd.ipch
.................\.................\StringOverLoading
.................\.................\StringOverLoading.sdf
.................\.................\StringOverLoading.sln
.................\.................\StringOverLoading.suo
.................\.................\.................\Debug
.................\.................\.................\.....\CL.read.1.tlog
.................\.................\.................\.....\CL.write.1.tlog
.................\.................\.................\.....\link-cvtres.read.1.tlog
.................\.................\.................\.....\link-cvtres.write.1.tlog
.................\.................\.................\.....\link.9760-cvtres.read.1.tlog
.................\.................\.................\.....\link.9760-cvtres.write.1.tlog
.................\.................\.................\.....\link.9760.read.1.tlog
.................\.................\.................\.....\link.9760.write.1.tlog
.................\.................\.................\.....\link.read.1.tlog
.................\.................\.................\.....\link.write.1.tlog
.................\.................\.................\.....\main.obj
.................\.................\.................\.....\mt.read.1.tlog
.................\.................\.................\.....\mt.write.1.tlog
.................\.................\.................\.....\MyString.obj
.................\.................\.................\.....\rc.read.1.tlog
.................\.................\.................\.....\rc.write.1.tlog
.................\.................\.................\.....\StringOverLoading.Build.CppClean.log
.................\.................\.................\.....\StringOverLoading.exe.embed.manifest
.................\.................\.................\.....\StringOverLoading.exe.embed.manifest.res
.................\.................\.................\.....\StringOverLoading.exe.intermediate.manifest
.................\.................\.................\.....\StringOverLoading.lastbuildstate
.................\.................\.................\.....\StringOverLoading.log
.................\.................\.................\.....\StringOverLoading.vcxprojResolveAssemblyReference.cache
.................\.................\.................\.....\StringOverLoading.write.1.tlog
.................\.................\.................\.....\StringOverLoading_manifest.rc
.................\.................\.................\.....\vc100.idb
.................\.................\.................\.....\vc100.pdb
.................\.................\.................\main.cpp
.................\.................\.................\MyString.cpp
.................\.................\.................\MyString.h
.................\.................\.................\StringOverLoading.vcxproj
.................\.................\.................\StringOverLoading.vcxproj.filters
.................\.................\.................\StringOverLoading.vcxproj.user