随笔分类 -  C++

上一页 1 ··· 5 6 7 8 9
摘要:1:puts函数可以输出提示信息的字符串。 2:代码如下: // 2.4.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { int iInt1,iInt2; /*定义两个整型变量*/ puts("请输入两个数字"); /*通过puts函 阅读全文
posted @ 2017-09-11 09:19 一串字符串
摘要:1:代码如下: // 2.3.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { long iLong=100000; /*定义长整型变量,为其赋值*/ printf("the Long is %ld\n",iLong); /*输出长整型 阅读全文
posted @ 2017-09-08 15:41 一串字符串
摘要:1:使用printf函数对不同类型变量进行输出,%符号,代表输出类型,\n代表换行,代码如下: // 2.2.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { int iInt=10; /*定义整型变量*/ char cChar='A' 阅读全文
posted @ 2017-09-08 15:17 一串字符串
摘要:1:代码如下: // 2.1.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" void main() { float eps = 0.0000001;//定义0的精度 float fvar = 0.00001; if (fvar >= -eps && fvar 阅读全文
posted @ 2017-09-08 15:09 一串字符串
摘要:1:首先参看代码: #include "stdafx.h" #include "iostream" using namespace std; class A { private: int value; public: A(int n) { value=n; } //A(A other)!!这是错误的 阅读全文
posted @ 2017-09-06 17:27 一串字符串
摘要:1:首先,根据课本上的程序,是这样的: #include "stdafx.h" #include "iostream" using namespace std; int StrToInt(char* string); int StrToInt(char* string) { int number=0 阅读全文
posted @ 2017-09-05 20:50 一串字符串
摘要:1:代码如下: 运行结果: 阅读全文
posted @ 2016-09-13 10:58 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-08-24 15:17 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-08-02 00:32 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-07-29 20:27 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-07-13 20:19 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-06-13 14:39 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-05-09 20:21 一串字符串
只有注册用户登录后才能阅读该文。
posted @ 2016-05-02 11:18 一串字符串

上一页 1 ··· 5 6 7 8 9