
c++
Fanstasic
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++ 函数指针与指针函数
#include <iostream> using namespace std; // 指针函数 int *square(int &a) { int *s = new int; *s = a * a; return s; } int square1(int &a) { int s1 = a * a; return s1; } int main() ...原创 2018-08-08 01:51:15 · 268 阅读 · 0 评论 -
vs c++EGE
#include "graphics.h" #include <iostream> int main() { initgraph(640, 480);//绘图初始化 outtextxy(100, 300, "aloha word!");//绘图 line(10, 10, 400, 400); ege::getch();//清理 closegraph(); syst...原创 2018-08-04 19:47:04 · 354 阅读 · 1 评论 -
C++ 控制*移动
#include <iostream> #include<conio.h> using namespace std; int displaymap(int i_arry[20][20]) { system("CLS"); for (int i = 0;i < 20;i++) { for (int k = 0;k < 20;k++) { if...原创 2018-07-23 02:38:36 · 2989 阅读 · 0 评论 -
c++,随机数生成与cin.get(的使用方法)
使用系统时间生成随机数原创 2018-07-12 20:48:35 · 321 阅读 · 0 评论 -
c++ 推箱子demo
#include <iostream> #include<conio.h> using namespace std; int displaymap(int i_arry[20][20]) { system("CLS"); for (int i = 0; i < 20; i++) { for (int k = 0; k < 20; k++) { ...原创 2018-07-24 01:45:56 · 705 阅读 · 0 评论 -
c++ 二进制转换
#include "stdafx.h" #include<iostream> #include<bitset> using namespace std; int main() { int value = 255; char cvalue[10]; _itoa_s(value, cvalue, 16); cout << cvalue << ...原创 2018-07-12 10:53:06 · 2295 阅读 · 0 评论 -
c++ for 循环的使用
// ConsoleApplication2.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; int num_1; int num_2; int main() { cin >> num_1; cin >> num_2; in...原创 2018-07-05 12:32:37 · 347 阅读 · 0 评论 -
c++ swcith 的使用方法
// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std;//使用命名空间std; //榴莲18/斤,苹果8/斤,香蕉3/斤,奇异果6.5/斤,桂圆8.5/斤,西瓜3.1/斤;问;身上100元,输入水果数,求余额; int Du...原创 2018-07-05 11:43:22 · 865 阅读 · 0 评论 -
c++
定义空间#include "stdafx.h" #include <iostream> //using namespace std; int main() { std::cout << "hello word!" << std::endl; system("pause"); printf("Hello world\n"); puts(原创 2018-07-02 11:27:06 · 215 阅读 · 0 评论 -
C++ HELLO WORD!
#include "stdafx.h" #include <iostream> using namespace std; int main() { cout << "hello word!" << endl; // 输出hello word! return 0; }原创 2018-07-02 10:13:00 · 1231 阅读 · 0 评论 -
模板类与类模板、函数模板与模板函数等的区别
在C++中有好几个这样的术语,但是我们很多时候用的并不正确,几乎是互相替换混淆使用。下面我想彻底辨清几个术语,这样就可以避免很多概念上的混淆和使用上的错误。这几个词是: 函数指针——指针函数 数组指针——指针数组 类模板——模板类 函数模板——模板函数 最终在使用中,我们就可以让它们实至名归,名正言顺。 1.函数指针——指针函数 函数指针的重点是指针。表示的是一个指针,...转载 2018-09-17 22:56:33 · 249 阅读 · 0 评论