![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
S
CCodes
这个作者很懒,什么都没留下…
展开
-
safe_arr.cpp
#include #include class sometype { int a[3]; public: sometype(int i, int j, int k) { a[0] = i; a[1] = j; a[2] = k; } int &operator[](int i); };int &sometype::operator[原创 2007-11-08 20:37:00 · 291 阅读 · 0 评论 -
scroll1.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 20:42:00 · 318 阅读 · 0 评论 -
scroll_window.cpp
#include #include "Scroll_Window.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 &&原创 2007-11-08 20:45:00 · 381 阅读 · 0 评论 -
seek_tel.cpp
#include #include #include void main(int argc, char *argv[]) { if(argc!=4) { cout " exit(1); } fstream out(argv[1], ios::in | ios::out | ios::binary); if(!out) { c原创 2007-11-08 20:49:00 · 296 阅读 · 0 评论 -
select_c.c
#include #include void main(void) { int drive_count; drive_count = setdisk(3); printf("The number of available drives is %d/n", drive_count); }原创 2007-11-08 20:51:00 · 435 阅读 · 0 评论 -
setcom1.c
#include #include void main(void) { char i = 0, title[] = "Jamsa/s C/C++ Programmer/s Bible"; unsigned status; status = _bios_serialcom(_COM_INIT, 0, _COM_9600 | _COM_CHR8 | _COM_STOP1原创 2007-11-08 21:01:00 · 445 阅读 · 0 评论 -
set_newh.cpp
#include #include #include void no_memory(void) { cerr exit(0); }void main(void) { char *ptr; set_new_handler(no_memory); do { ptr = new char[10000]; if (ptr) c原创 2007-11-08 21:06:00 · 280 阅读 · 0 评论 -
shofirst.c
#include #include void main(int argc, char *argv[]) { char line[255]; // Line read from the file int i,j; FILE *fp; if (argc > 2) j = 10; else j = argv[2]; if (fp = fope原创 2007-11-08 21:10:00 · 320 阅读 · 0 评论 -
showarra.c
#include void main(void) { int scores[5] = {80, 70, 90, 85, 80}; int i; printf("Array Values/n"); for (i = 0; i printf("scores[%d] %d/n", i, scores[i]); }原创 2007-11-08 21:33:00 · 330 阅读 · 0 评论 -
showems.c
#include #include #include #include int check_for_ems(void) { union REGS inregs, outregs; struct SREGS segs; int major, minor; // DOS version struct DeviceHeader { s原创 2007-11-08 21:36:00 · 430 阅读 · 0 评论 -
showenum.c
#include void main(void) { enum weekdays { Monday, Tuesday, Wednesday, Thursday, Friday }; printf("%d %d %d %d %d/n", Monday, Tuesday, Wednesday, Thursday, Friday); }原创 2007-11-08 21:37:00 · 324 阅读 · 0 评论 -
showfile.c
#include void main(int argc, char *argv[]) { FILE *fp; // File pointer char line[255]; // Line from file if ((fp = fopen(argv[1], "r")) == NULL) printf("Error opening %s原创 2007-11-08 21:39:00 · 396 阅读 · 0 评论 -
showflag.cpp
#include void showflags(void);void main(void) { showflags(); cout.setf(ios::right | ios::showpoint | ios::fixed); showflags(); }void showflags(void) { long flag_set, i; int j; char原创 2007-11-08 21:39:00 · 496 阅读 · 0 评论 -
showfmod.c
#include #include void main(void) { double numerator = 10.0; double denominator = 3.0; printf("fmod(10, 3) is %f/n", fmod(numerator, denominator)); }原创 2007-11-08 21:40:00 · 327 阅读 · 0 评论 -
showsign.c
#include void main(void) { int neg_int = -5; int pos_int = 5; float neg_flt = -100.23; float pos_flt = 100.23; printf("The integer values are %+d and %+d/n", neg_int, pos_int); pri原创 2007-11-08 21:42:00 · 308 阅读 · 0 评论 -
show_mess.cpp
#include #include "show_mess.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 && (BO原创 2007-11-08 21:51:00 · 319 阅读 · 0 评论 -
show_not.cpp
#include void sample(int x, char *y);void sample(float x, long y);void sample(char *x, char *y);void main(void) { sample(10, "hi"); sample(0.23, 10L); sample("Jamsas", "C/C++"); }void s原创 2007-11-08 21:53:00 · 334 阅读 · 0 评论 -
show_pos.c
#include void main(void) { FILE *input; int letter; if ((input = fopen("//CONFIG.SYS", "r")) == NULL) printf("Error opening //CONFIG.SYS/n"); else { printf("Current positi原创 2007-11-08 21:55:00 · 387 阅读 · 0 评论 -
show_sin.c
#include #include void main(void) { double radians; for (radians = 0.0; radians printf("Sine of %f is %f/n", radians, sin(radians)); }原创 2007-11-08 21:57:00 · 337 阅读 · 0 评论 -
show_tan.c
#include #include void main(void) { double pi = 3.14159265; printf("Tangent of pi is %f/n", tan(pi)); printf("Tangent of pi/4 is %f/n", tan(pi / 4.0)); }原创 2007-11-08 21:59:00 · 435 阅读 · 0 评论 -
show_three.cpp
#include #include "show_three.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 22:00:00 · 348 阅读 · 0 评论 -
show_windows.cpp
#include LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { case WM_COMMAND: switch ( LOWORD( wParam ) ) {原创 2007-11-08 22:01:00 · 334 阅读 · 0 评论 -
shuffle.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 V原创 2007-11-08 22:03:00 · 407 阅读 · 0 评论 -
simple.cpp
#include void main(void) { cout }原创 2007-11-08 22:04:00 · 395 阅读 · 0 评论 -
simple_e.cpp
#include void main(void) { cout try { cout throw 100; cout } catch(int i) { cout cout } cout }原创 2007-11-08 22:05:00 · 278 阅读 · 0 评论 -
simple_thread.cpp
#include // This is a child thread procedure that waits for a semaphore,// holds the semaphore for five seconds, and releases the semaphore.// Threads that cannot get semaphores will wait until ot原创 2007-11-08 22:06:00 · 307 阅读 · 0 评论 -
siren.c
#include #include void main(void) { unsigned frequency; do { for (frequency = 500; frequency { sound(frequency); delay(50); } for (frequency = 1000; frequen原创 2007-11-08 22:10:00 · 335 阅读 · 0 评论 -
sleep_5.c
#include #include void main(void) { printf("About to sleep for 5 seconds/n"); sleep(5); printf("Awake/n"); }原创 2007-11-08 22:11:00 · 314 阅读 · 0 评论 -
spawnlxx.c
#include #include void main(void) { char *env[] = { "FILE=SPAWNLXX.C", "LANGUAGE=C", "OS=DOS", NULL}; spawnle(P_WAIT, "CHILD.EXE", "CHILD.EXE", "Using-spawnle", "BBB", NULL, env); spawnlp(原创 2007-11-08 22:14:00 · 295 阅读 · 0 评论 -
sprintf.c
#include void main(void) { int employee_number = 12345; char region[] = "SEA"; char filename[64]; sprintf(filename, "%s%d", region, employee_number); printf("Employee filename: %s/n"原创 2007-11-08 22:15:00 · 345 阅读 · 0 评论 -
sqrt.c
#include #include void main(void) { double value; for (value = 0.0; value printf("Value %f sqrt %f/n", value, sqrt(value)); }原创 2007-11-08 22:16:00 · 351 阅读 · 0 评论 -
stre_in.cpp
#include #include void main(void) { char in_string[] = "10 Hello 0x88 12.23 done"; istrstream ins(in_string, 8); int i; char str[80]; float f; ins >> i; ins >> str; cout ins >原创 2007-11-08 22:57:00 · 387 阅读 · 0 评论 -
strftime.c
#include #include void main(void) { char buffer[128]; struct tm *datetime; time_t current_time; tzset(); time(¤t_time); datetime = localtime(¤t_time); strftime(bu原创 2007-11-08 22:57:00 · 342 阅读 · 0 评论 -
strieql.c
#include #include int strieql(char *str1, char *str2) { while ((toupper(*str1) == toupper(*str2)) && (*str1)) { str1++; str2++; } return((*str1 == NULL) && (*str2 == NULL原创 2007-11-08 22:58:00 · 311 阅读 · 0 评论 -
strtime.c
#include #include void main(void) { char time[9]; _strtime(time); printf("The current time is %s/n", time); }原创 2007-11-08 23:01:00 · 417 阅读 · 0 评论 -
strxfrm.c
#include #include void main(void) { char buffer[64] = "Jamsa/s C/C++ Programmer/s Bible"; char target[64]; int length; length = strxfrm(target, buffer, sizeof(buffer)); printf("L原创 2007-11-08 23:02:00 · 491 阅读 · 0 评论 -
str_ptr.c
#include void show_string(char *string) { while (*string) putchar(*string++); }void main(void) { show_string("Jamsa/s C/C++ Programmer/s Bible"); }原创 2007-11-08 23:03:00 · 486 阅读 · 0 评论 -
swab.c
#include #include #include #include void main(void) { char *source = "aJsm/a s/C+C +rPgoarmmres/B biele"; char target[64]; memset(target, NULL, sizeof(target)); swab(source, target原创 2007-11-08 23:04:00 · 537 阅读 · 0 评论 -
swap_b.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 23:05:00 · 742 阅读 · 0 评论 -
samename.cpp
#include #include struct Msg { char message[256]; void show_message(void) { cout };struct UpperMsg { char message[256]; void show_message(void) { cout };void main(void) { Msg book = {原创 2007-11-08 20:38:00 · 408 阅读 · 0 评论