![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
F
CCodes
这个作者很懒,什么都没留下…
展开
-
func_two.cpp
#include struct Msg { char message[256]; void show_message(char *message); };void Msg::show_message(char *message) { cout }void main(void) { struct Msg book = { "Jamsas C/C++ Programme原创 2007-11-08 17:55:00 · 418 阅读 · 0 评论 -
fun_catc.cpp
#include void XHandler(int test) { try { if(test) throw test; } catch(int i) { cout } }void main(void) { cout XHandler(1); XHandler(2); XHandler(0); XHandler(3原创 2007-11-08 17:55:00 · 424 阅读 · 0 评论 -
func_thr.cpp
#include struct Msg { char first[256]; void show_title(int value) { cout }};void main(void) { struct Msg book = { "This book has " }; book.show_title(1500); }原创 2007-11-08 17:55:00 · 427 阅读 · 0 评论 -
func_mbr.cpp
#include struct Msg { char message[256]; void show_message(void) { cout };void main(void) { struct Msg book = { "Jamsas C/C++ Programmers Bible" }; book.show_message(); }原创 2007-11-08 17:54:00 · 472 阅读 · 0 评论 -
funct_2d.c
#include void show_2d_array(int array[][10], int rows) { int i, j; for (i = 0; i for (j = 0; j printf("array[%d][%d] = %d/n", i, j, array[i][j]); }void main(void) { int a[1][原创 2007-11-08 17:54:00 · 456 阅读 · 0 评论 -
functref.cpp
#include void change_value(int& reference_value) { reference_value = 1500; }void main(void) { int value = 10; int& alias = value; cout change_value(alias); cout }原创 2007-11-08 17:53:00 · 431 阅读 · 0 评论 -
fullname.c
#include #include #include void main(void) { char s[MAXPATH]; char drive[MAXDRIVE]; char dir[MAXDIR]; char file[MAXFILE]; char ext[MAXEXT]; getcwd(s,MAXPATH); /*原创 2007-11-08 17:51:00 · 420 阅读 · 0 评论 -
ftime.c
#include #include #include void main(void) { struct timeb timezone; tzset(); ftime(&timezone); printf("Seconds since 1 January 1970 (GMT) %ld/n", timezone.time); printf("Fracti原创 2007-11-08 17:51:00 · 398 阅读 · 0 评论 -
frexp.c
#include #include void main(void) { double value = 1.2345; double mantissa; int exponent; mantissa = frexp(value, &exponent); printf("Mantissa %f Exponent %d Value %f/n", man原创 2007-11-08 17:48:00 · 349 阅读 · 0 评论 -
frd_fun.cpp
#include class sample { int a, b; public: friend int sum(sample x); void set_ab(int i, int j); };void sample::set_ab(int i, int j) { a = i; b = j; }int sum(sample object) { /*原创 2007-11-08 17:47:00 · 321 阅读 · 0 评论 -
for_more.c
#include void main(void) { char letter; float percent; for (letter = A; letter putchar(letter); for (letter = z; letter >= a; letter--) putchar(letter); putchar(/n原创 2007-11-08 17:46:00 · 219 阅读 · 0 评论 -
flt_pt.c
#include void main(void) { printf("Displaying 0.1234 yields %g/n", 0.1234); printf("Displaying 0.00001234 yields %g/n", 0.00001234); }原创 2007-11-08 17:43:00 · 303 阅读 · 0 评论 -
floatout.c
#include void main(void) { float price = 525.75; float sales_tax = 0.06; printf("The item cost is %f/n", price); printf("Sales tax on the item is %f/n", price * sales_tax); }原创 2007-11-08 17:42:00 · 596 阅读 · 0 评论 -
fun_nthr.cpp
#include void XHandler(int test) throw() { if(test==0) throw test; if(test==1) throw a; if(test==2) throw 123.23; }void main(void) { cout try { XHandler(0);原创 2007-11-08 17:56:00 · 502 阅读 · 0 评论 -
fun_over.cpp
#include class loc { int longitude, latitude; public: loc(void) {} // Used to construct temporaries loc (int lg, int lt) { longitude = lg; latitude = lt;原创 2007-11-08 17:56:00 · 347 阅读 · 0 评论 -
functovr.c
#include #include float add_em(long int a, float b) { float result; result = a + b; return(result); } void main(void) { long int i; float result = 0; time_t start_time, st原创 2007-11-08 17:52:00 · 399 阅读 · 0 评论 -
fscanf.c
#include void main(void) { FILE *fp; int age; float salary; char name[64]; if ((fp = fopen("DATA.DAT", "w")) == NULL) printf("Error opening DATA.DAT for output/n"); else {原创 2007-11-08 17:50:00 · 489 阅读 · 0 评论 -
frn_inc.cpp
#include class loc { int longitude, latitude; public: loc(void) {} // Used to construct temporaries loc (int lg, int lt) { longitude = lg; latitude = lt;原创 2007-11-08 17:49:00 · 332 阅读 · 0 评论 -
friend2.cpp
#include #include class Reader { public: Reader(char *name) { strcpy(Reader::name, name); }; void show_reader(class Book book); private: char name[64];};class Book { public: Book原创 2007-11-08 17:49:00 · 356 阅读 · 0 评论 -
free.c
#include #include void main(void) { int *int_values; int i; if ((int_values = malloc(100 * sizeof(int))) == NULL) printf("Error allocating the array/n"); else { for (i原创 2007-11-08 17:48:00 · 390 阅读 · 0 评论 -
fprintf.c
#include void main(void) { FILE *fp; int pages = 800; float price = 49.95; if (fp = fopen("FPRINTF.DAT", "w")) { fprintf(fp, "Book Title: Jamsa/s C & C++ Programmer/s Bible原创 2007-11-08 17:47:00 · 365 阅读 · 0 评论 -
for_diff.c
#include void main(void) { int counter; for (counter = -100; counter printf("%d ", counter); printf("/nStarting second loop/n"); for (counter = 100; counter >= -100; counter -=原创 2007-11-08 17:45:00 · 288 阅读 · 0 评论 -
first.cpp
#include #include void main(int argc, char **argv) { char letter; int count = 0; int line_limit; line_limit = atoi(argv[1]); while ((letter = cin.get()) != -1) { cout.put(原创 2007-11-08 14:05:00 · 314 阅读 · 0 评论 -
findres.h
#define IDM_EXIT 100#define IDM_TEST 200#define IDM_ABOUT 301typedef struct{ SHORT Value1; SHORT Value2; SHORT Value3;}RESDATA;LRESULT CALLBACK WndProc (HWND,原创 2007-11-08 14:03:00 · 342 阅读 · 0 评论 -
file_scr.c
#include #include #define VIDEO 0xB800 // CGA basevoid main(void) { FILE *fp; int offset; if ((fp = fopen("SAVE_SCR.DAT", "wb")) == NULL) printf("Error opening file/n"); else原创 2007-11-08 14:00:00 · 364 阅读 · 0 评论 -
fileno.c
#include #include void main(int argc, char *argv[]) { FILE *stream; int handle; long file_length; if (stream = fopen(argv[1], "r")) { // Some statements handle = fi原创 2007-11-08 13:59:00 · 309 阅读 · 0 评论 -
fun_thrw.cpp
#include void XHandler(int test) throw(int, char, double) { if(test==0) throw test; if(test==1) throw a; if(test==2) throw 123.23; }void main(void) { cout try { XHandler(0);原创 2007-11-08 17:57:00 · 398 阅读 · 0 评论 -
fixed.cpp
#include #include void main(void) { float value = 0.000123; cout cout }原创 2007-11-08 17:42:00 · 331 阅读 · 0 评论 -
find_len.c
#include int string_length(char *);void main(void) { char *title= "Jamsa/s C/C++ Programmer/s Bible"; char *section = "Tools"; printf("Length of %s is %d/n", title, string_length(title原创 2007-11-08 14:04:00 · 313 阅读 · 0 评论 -
findres.cpp
#include #include "FindRes.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 && (BOOL原创 2007-11-08 14:03:00 · 356 阅读 · 0 评论 -
filetabl.c
#include #include #include void main(void){ struct fcbs { char drive; char filename[8]; char extension[3]; int current_block; int record_size; }; typedef struct fcbs fcb; struct program_segme原创 2007-11-08 14:00:00 · 239 阅读 · 0 评论 -
frntback.cpp
#ifdef __BCPLUSPLUS__#include #else#include #endif#include #include using namespace std;typedef list LISTSTR;void main(void) { LISTSTR test; test.push_back("back"); test.push_front("mi原创 2007-11-08 17:49:00 · 433 阅读 · 0 评论 -
for_test.c
#include void main(void) { int counter; for (counter = 1; counter printf("%d ", counter); printf("/nStarting second loop/n"); for (counter = 1; counter printf("%d ", counter原创 2007-11-08 17:46:00 · 262 阅读 · 0 评论 -
for_down.c
#include void main(void) { int counter; for (counter = 5; counter >= 1; counter--) printf("%d ", counter); printf("/nStarting second loop/n"); for (counter = 10; counter >= 1; co原创 2007-11-08 17:46:00 · 350 阅读 · 0 评论 -
for_2var.c
#include void main(void) { int i, j; for (i = 0, j = 100; i printf("i = %d j = %d/n", i, j); }原创 2007-11-08 17:45:00 · 269 阅读 · 0 评论 -
fmalloc.c
#include #include void main(void) { char far *string; int far *int_values; float far *float_values; if ((string = (char *) farmalloc(50))) printf("Successfully allocated a 50 byte st原创 2007-11-08 17:44:00 · 355 阅读 · 0 评论 -
flush.cpp
#include void main(void) { cout clog }原创 2007-11-08 17:44:00 · 266 阅读 · 0 评论 -
firstset.cpp
// If you use Visual C++, set the compile options to /GX#ifdef __BCPLUSPLUS__#include #include #else#include #include #endifusing namespace std;typedef set SET_INT;void main(void) { SET_INT s原创 2007-11-08 17:40:00 · 246 阅读 · 0 评论 -
first.c
#include void main(void) { printf("Jamsa/s C/C++ Programmer/s Bible!"); }原创 2007-11-08 14:04:00 · 444 阅读 · 0 评论 -
filelen.c
#include #include #include #include void main(int argc, char *argv[]) { int file_handle; long file_size; if ((file_handle = open(argv[1], O_RDONLY)) == -1) printf("Error opening the原创 2007-11-08 13:58:00 · 286 阅读 · 0 评论