随笔分类 - 试卷及其他科目学习
摘要:1 #include <stdio.h> 2 #include<conio.h> 3 #include <iostream> 4 #include <string.h> 5 void main() 6 { 7 int i,j,k,count; 8 char s1[100],s2[100]; 9 printf("Please enter main string:");10 gets(s1);11 printf("enter sub string:");12 gets(s2);13 count=0;14 for
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 class Myclass 4 { 5 int number; 6 public: 7 Myclass(); 8 Myclass(int); 9 ~Myclass();10 void Display();11 };12 Myclass::Myclass(){cout<<"Constructing nurmally.\n";}13 Myclass::Myclass(int m):number(m){cout<<"Constructing w
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 #define AGE 18 4 #define MY_AGE 25 5 #define DISPY "已经被定义" 6 #define DISPN "尚未定义" 7 void main() 8 { 9 #ifdef AGE//判断AGE是否已被定义10 cout<<"AGE="<<AGE<<DISPY<<endl;//如果有11 #else12 cout<<DISPN&l
阅读全文
摘要:stdlib.h:stdlib.h里面定义了五种类型、一些宏和通用工具函数。 类型例如size_t、wchar_t、div_t、ldiv_t和lldiv_t; 宏例如EXIT_FAILURE、EXIT_SUCCESS、RAND_MAX和MB_CUR_MAX等等; 常用的函数如malloc()、calloc()、realloc()、free()、system()、atoi()、atol()、rand()、srand()、exit()等等。time.htime.h是C/C++中的日期和时间头文件。得到从程序启动到此次函数调用时累计的毫秒数。NVIDIA面试笔试题之一:assert.h是c标准库的一
阅读全文
浙公网安备 33010602011771号