![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
P
CCodes
这个作者很懒,什么都没留下…
展开
-
puttext.c
#include #include #include #include #include #include void main(void) { char buffer[128]; int row, column; clrscr(); cprintf("Jamsa/s C/C++ Programmer/s Bible/r/n"); gettext(1,原创 2007-11-08 20:18:00 · 439 阅读 · 0 评论 -
plt_arr2.cpp
#include #include const int size = 5;class plot { int x, y; public: plot(void); plot(int i, int j) { if(i>size) i = size; if(i i = 0; if(j>size) j原创 2007-11-08 19:49:00 · 254 阅读 · 0 评论 -
pen_bmp.cpp
HBITMAP hBitmap;HDC hDC;HDC hMemDC;// Load the bitmap into memoryhBitmap = LoadBitmap( hInst, "pen" );// Paint the bitmap onto the MemDC and then the screenhDC = GetDc( hWnd );hMemDC =原创 2007-11-08 19:47:00 · 266 阅读 · 0 评论 -
ptr_demo.c
#include void main(void) { int counter = 10; int *iptr; // Declare pointer value iptr = &counter; // Assign the address printf("Addres in iptr %x Value at *iptr %d/n", iptr,原创 2007-11-08 20:10:00 · 429 阅读 · 0 评论 -
ptrtoptr.c
#include int what_is_the_value(int ***ptr) { return(***ptr); }void main(void) { int *level_1, **level_2, ***level_3, value = 1001; level_1 = &value; level_2 = &level_1; level_3 = &le原创 2007-11-08 20:09:00 · 482 阅读 · 0 评论 -
ps_copy.cpp
// If you use Visual C++, set the compile options to /GX#ifdef __BCPLUSPLUS__#include #include #include #else#include #include #include #endifusing namespace std;void main(void){ const int VECT原创 2007-11-08 20:08:00 · 331 阅读 · 0 评论 -
psp_addr.c
#include #include void main(void) { printf("The Program Segment Prefix begins at %X/n", _psp); }原创 2007-11-08 20:07:00 · 384 阅读 · 0 评论 -
protect.cpp
#include #include class Book { public: Book(char *title) { strcpy(Book::title, title); }; void show_title(void) { cout protected: float cost; void show_cost(void) { cout private:原创 2007-11-08 20:04:00 · 307 阅读 · 0 评论 -
privstru.cpp
#include #include struct MyBook { char title[64]; // Public by default void show_book(void) { cout }; void set_price(float amount) { price = amount; }; void assign_title(char *原创 2007-11-08 20:03:00 · 224 阅读 · 0 评论 -
precise.c
#include void main(void) { float accurate = 0.123456790987654321; double more_accurate = 0.1234567890987654321; printf("Value of float/t %21.19f/n", accurate); printf("Value of double/t原创 2007-11-08 19:52:00 · 327 阅读 · 0 评论 -
printchk.c
#include #include #include void main(void) { int status = 0; int old_status = 0; do { status = biosprint(2, 0, 0); // Read LPT1 if (status != old_status) {原创 2007-11-08 19:54:00 · 349 阅读 · 0 评论 -
print_file.h
#define IDM_EXIT 100#define IDM_TEST 200#define IDM_ABOUT 301LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);LRESULT CALLBACK About (HWND, UINT, WPARAM, LPAR原创 2007-11-08 19:56:00 · 277 阅读 · 0 评论 -
puts.c
#include #include #include void main(void) { int count; time_t start_time, stop_time; time(&start_time); for (count = 0; count printf("Jamsa/s C/C++ Programmer/s Bible/n"); t原创 2007-11-08 20:17:00 · 403 阅读 · 0 评论 -
putenv.c
#include #include void main(void) { if (putenv("BOOK=Jamsa/s C & C++ Programmer/s Bible")) printf("Error writing to environment/n"); else { int i; for (i = 0; environ[i原创 2007-11-08 20:17:00 · 309 阅读 · 0 评论 -
putch.c
#include #include #include void main(void) { int letter; int count; time_t start_time, stop_time; time(&start_time); for (count = 0; count for (letter = A; letter putchar原创 2007-11-08 20:16:00 · 456 阅读 · 0 评论 -
pub_priv.cpp
#include #include #include class Book { public: char title[256]; char author[64]; float price; void show_title(void) { cout float get_price(void) { return(price); }; void show原创 2007-11-08 20:14:00 · 468 阅读 · 0 评论 -
ptrarray.c
#include void main(void) { int values[5] = {1, 2, 3, 4, 5}; int counter; int *iptr; iptr = values; for (counter = 0; counter { printf("%d/n", *iptr); iptr++; } }原创 2007-11-08 20:09:00 · 506 阅读 · 0 评论 -
prt_cnt.c
#include void main(void) { int first_count; int second_count; printf("Jamsa%n/s C/C++ Programmer/s Bible%n/n", &first_count, &second_count); printf("First count %d Second count %d/n",原创 2007-11-08 20:06:00 · 306 阅读 · 0 评论 -
prot_bas.cpp
#include class base { protected: int i, j; public: void setij(int a, int b) { i=a; j=b; } void showij(void) {cout };class derived : protected base { private: int k; public原创 2007-11-08 20:05:00 · 279 阅读 · 0 评论 -
protderi.cpp
#include #include class Base { public: Base(char *str) { strcpy(message, str); }; void show_base(void) { cout protected: char message[256]; };class Level1 : public Base { public:原创 2007-11-08 20:04:00 · 338 阅读 · 0 评论 -
privmult.cpp
#include class One { public: One(void) { cout one = 1; }; int one;};class Two { public: Two(void) { cout two = 2; }; int two;};class Three { public: Three(void) {原创 2007-11-08 19:57:00 · 308 阅读 · 0 评论 -
plot_arr.cpp
#include #include const int size = 5;class plot { int x, y; public: plot(int i, int j) { if(i>size) i = size; if(i i = 0; if(j>size) j = size;原创 2007-11-08 19:48:00 · 308 阅读 · 0 评论 -
passfunc.c
#include int get_result(int a, int b, int (*compare)()) { return(compare(a, b)); // Invoke the function passed } int max(int a, int b) { printf("In max/n"); return((a > b) ? a: b); }int原创 2007-11-08 19:46:00 · 356 阅读 · 0 评论 -
public.cpp
#include #include class movie { public: char name[64]; char first_star[64]; char second_star[64]; void show_movie(void); void initialize(char *name, char *first, char *secon原创 2007-11-08 20:13:00 · 393 阅读 · 0 评论 -
ptr_out.c
#include void main(void) { int value; printf("The address of the variable value is %p/n", &value); }原创 2007-11-08 20:12:00 · 345 阅读 · 0 评论 -
ptr_obj.cpp
#include class Base { public: void base_message(void) { cout };class Derived: public Base { public: void derived_message(void) { cout };void main(void) { Base *base_pointer = new Base;原创 2007-11-08 20:11:00 · 403 阅读 · 0 评论 -
prt_echo.c
#include #include void main(void) { char line[255]; // Line of text read while (fgets(line, sizeof(line), stdin)) { fputs(line, stdout); strcat(line, "/r"); fputs(l原创 2007-11-08 20:06:00 · 324 阅读 · 0 评论 -
privstat.cpp
#include class SomeClass { public: SomeClass(int value) { count++; my_data = value; }; SomeClass(int value, int static_value) { count = static_value; my_data = value; }; ~SomeCla原创 2007-11-08 20:02:00 · 293 阅读 · 0 评论 -
print_file.cpp
#include #include "Print_File.h" #if defined (WIN32) #define IS_WIN32 TRUE#else #define IS_WIN32 FALSE#endif#define IS_NT IS_WIN32 && (BOOL)(GetVersion() #define IS_WIN32S IS_WIN32 && (B原创 2007-11-08 19:55:00 · 316 阅读 · 0 评论 -
polymorp.cpp
#include #include class Base { public: virtual int add(int a, int b) { return(a + b); }; virtual int sub(int a, int b) { return(a - b); }; virtual int mult(int a, int b) { return(a * b); };}原创 2007-11-08 19:50:00 · 290 阅读 · 0 评论 -
pcounter.cpp
#include #include void main(void) { char str[80]; ostrstream outs(str, sizeof(str)); outs outs outs cout cout }原创 2007-11-08 19:47:00 · 370 阅读 · 0 评论 -
purevirt.cpp
#include #include class Base { public: virtual void show_message(void) { cout virtual void show_reverse(void) = 0;};class Derived : public Base { public: virtual void show_message(void) {原创 2007-11-08 20:15:00 · 400 阅读 · 0 评论 -
putchar.c
#include void main(void) { int letter; for (letter = A; letter putchar(letter); }原创 2007-11-08 20:16:00 · 454 阅读 · 0 评论 -
parm_man.cpp
#include #include ostream &indent(ostream &stream, int length) { register int i; for(i=0; i cout return stream; }omanip indent(int length) { return omanip(indent, length); }voi原创 2007-11-08 19:46:00 · 333 阅读 · 0 评论 -
paint_rect.cpp
#include #include "Paint_Rect.h" #if defined (WIN32) #define IS_WIN32 TRUE#else #define IS_WIN32 FALSE#endif#define IS_NT IS_WIN32 && (BOOL)(GetVersion() #define IS_WIN32S IS_WIN32 && (B原创 2007-11-08 19:45:00 · 312 阅读 · 0 评论 -
putwgetw.c
#include #include void main(void) { FILE *fp; int word; if ((fp = fopen("DATA.DAT", "wb")) == NULL) { printf("Error opening DATA.DAT for output/n"); exit(1); } els原创 2007-11-08 20:19:00 · 413 阅读 · 0 评论 -
ptr_upr.c
#include #include char *string_uppercase(char *string) { char *starting_address; starting_address = string; while (*string) toupper(*string++); return(starting_address); }void原创 2007-11-08 20:13:00 · 414 阅读 · 0 评论 -
printfok.c
#include void main(void) { int result; result = printf("Jamsa/s C/C++ Programmer/s Bible!/n"); if (result == EOF) fprintf(stderr, "Error within printf/n"); }原创 2007-11-08 19:55:00 · 376 阅读 · 0 评论 -
prepost.c
#include void main(void) { int value = 1; printf("Using postfix %d/n", value++); printf("Value after increment %d/n", value); value = 1; printf("Using prefix %d/n", ++value); pri原创 2007-11-08 19:53:00 · 425 阅读 · 0 评论 -
pow_doub.cpp
#include class pwr { double b; int e; double val; public: pwr(double base, int exp); pwr operator+(pwr obj) { double base; int exp; base = b + obj.b; exp = e + ob原创 2007-11-08 19:52:00 · 381 阅读 · 0 评论