![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
O
CCodes
这个作者很懒,什么都没留下…
展开
-
oct_hex.c
原创 2007-11-08 19:32:00 · 347 阅读 · 0 评论 -
over_pt.cpp
#include int somef(int a);int somef(int a, int b);void main(void) { int (*fp)(int a); // pointer to int xxx(int) fp = somef; // points to somef(int) cout }int somef(int a) {原创 2007-11-08 19:42:00 · 348 阅读 · 0 评论 -
overload.cpp
#include int sum(int *array, int element_count) { int result = 0; int count; for (count = 0; count result += array[count]; return(result); }float sum(float *array, int element_c原创 2007-11-08 19:39:00 · 388 阅读 · 0 评论 -
overflow.c
#include void main(void) { int positive = 32767; int negative = -32768; printf("%d + 1 is %d/n", positive, positive+1); printf("%d - 1 is %d/n", negative, negative-1); }原创 2007-11-08 19:38:00 · 499 阅读 · 0 评论 -
out_func.cpp
#include void XHandler(int test) { cout if(test) throw test; }void main(void) { cout try { cout XHandler(1); XHandler(2); XHandler(0); } catch(int i) {原创 2007-11-08 19:37:00 · 412 阅读 · 0 评论 -
over_ptr.cpp
#include class sample { public: int i; sample *operator->(void) {return this;} };void main(void) { sample obj; obj->i = 10; // Same as obj.i cout i; }原创 2007-11-08 19:43:00 · 401 阅读 · 0 评论 -
over_pls.cpp
#include #include #include class String { public: char *operator +(char *append_str) { return(strcat(buffer, append_str)); }; char *operator -(char letter); String(char *strin原创 2007-11-08 19:42:00 · 410 阅读 · 0 评论 -
os_ver.c
#include #include void main(void) { printf("Operating system version number %d.%d/n", _osmajor, _osminor); printf("Operating system version number %d.%d/n", _version & 255, _version >原创 2007-11-08 19:36:00 · 436 阅读 · 0 评论 -
one_line.c
#include void main(void) { printf ("This is line one."); printf ("This is the second line."); }原创 2007-11-08 19:35:00 · 456 阅读 · 0 评论 -
ok_recur.c
原创 2007-11-08 19:34:00 · 306 阅读 · 0 评论 -
over_inc.cpp
// This file will not compile under TCLite because it does not support// dual-overloaded increment operators#include #include #include class String { public: String String::operator++()原创 2007-11-08 19:41:00 · 447 阅读 · 0 评论 -
over_err.cpp
#include float sample_function(float i);double sample_function(double i);void main(void){ cout cout }float sample_function(float i){ return i;}double sample_function(double i){ return -i;原创 2007-11-08 19:40:00 · 448 阅读 · 0 评论 -
onep_ini.cpp
#include class sample { int value; public: sample(int j) {value = j;} // constructor int get_value(void) {return value;} };void main(void) { int loop; sample obj[3] = {1 , 2, 3};原创 2007-11-08 19:34:00 · 349 阅读 · 0 评论 -
over_dec.cpp
// This file will not compile under TCLite because it does not support// dual-overloaded decrement operators#include #include #include class String { public: String String::operator--()原创 2007-11-08 19:39:00 · 395 阅读 · 0 评论 -
outover.cpp
#include #include class Employee { public: Employee(char *name, char sex, int age, char *phone) { strcpy(Employee::name, name); Employee::sex = sex; Employee::age = age; strcpy(E原创 2007-11-08 19:36:00 · 342 阅读 · 0 评论 -
odd_even.c
原创 2007-11-08 19:33:00 · 370 阅读 · 0 评论 -
over_tmp.cpp
#include template void swap(X &a, X &b);void swap(int &a, int &b);int main(void) { int i=10, j=20; float x=10.1, y=23.3; char a=x, b=z; cout cout cout swap(i,j);原创 2007-11-08 19:44:00 · 442 阅读 · 0 评论