当前位置: 首页 > news >正文

做网站建设要什么证品牌公关

做网站建设要什么证,品牌公关,深圳最新消息今天新增,网络营销导向的网站建设的基本原则简单案例需求: 1,计算正方形和三角形的周长——函数 2,模拟不同类型的动物叫声——类 一、创建项目 C空项目 Class_Study 二、创建主函数 在源文件下添加新建项,main.cpp 三、自定义头文件——函数 需求:1&a…

简单案例需求:
1,计算正方形和三角形的周长——函数
2,模拟不同类型的动物叫声——类

一、创建项目

C++空项目
Class_Study
在这里插入图片描述
在这里插入图片描述

二、创建主函数

在源文件下添加新建项,main.cpp
在这里插入图片描述
在这里插入图片描述

三、自定义头文件——函数

需求:1,计算正方形和三角形的周长

在头文件下添加新建项,Circumference.h
在源文件下添加新建项,Circumference.cpp
最好两个文件名称一致,头文件.h负责函数声明,.cpp用于函数实现
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
结构如下所示:
在这里插入图片描述

Circumference.h用于声明两个函数,分别用于计算正方形和三角形的周长
Circumference.cpp用于对两个函数的实现

Circumference.h 头文件函数声明

#pragma once
int square(int a);
int triangle(int a);

Circumference.cpp 相应函数实现

#include"Circumference.h"
int square(int a) 
{return a * 4;
}int triangle(int a) 
{return a * 3;
}

main.cpp 主函数

#include"Circumference.h"
#include<iostream>
int main(int argc,char* argv[])
{int queare_, triangle_;queare_ = square(5);triangle_ = triangle(5);std::cerr <<"queare is: " << queare_ << std::endl;std::cerr <<"triangle is: " << triangle_ << std::endl;return 0;
}

运行
在这里插入图片描述

结果
在这里插入图片描述

四、自定义头文件——类

需求:2,模拟不同类型的动物叫声——类

新建项为C++类
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
系统会生成对应的.h.cpp文件
在这里插入图片描述
Animal.h用于声明一个Animal类,里面有两个方法,cat和dog
Animal.cpp用于对Animal类里面的方法进行实现

Animal.h

#pragma once
class Animal
{
public:void cat();void dog();
};

Animal.cpp

#include "Animal.h"
#include<iostream>void Animal::cat() 
{std::cerr << "miaomiaomiao~~~" << std::endl;
}void Animal::dog()
{std::cerr << "wangwangwang~~~" << std::endl;
}

main.cpp

#include"Animal.h"
#include<iostream>
int main(int argc,char* argv[])
{Animal* a = new Animal();a->dog();a->cat();return 0;
}

运行
在这里插入图片描述

结果
在这里插入图片描述

五、完整项目,实现两个需求

Circumference.h

#pragma once
int square(int a);
int triangle(int a);

Animal.h

#pragma once
class Animal
{
public:void cat();void dog();
};

Circumference.cpp

#include"Circumference.h"
int square(int a) 
{return a * 4;
}int triangle(int a) 
{return a * 3;
}

Animal.cpp

#include "Animal.h"
#include<iostream>void Animal::cat() 
{std::cerr << "miaomiaomiao~~~" << std::endl;
}void Animal::dog()
{std::cerr << "wangwangwang~~~" << std::endl;
}

main.cpp

#include"Circumference.h"
#include"Animal.h"
#include<iostream>
int main(int argc,char* argv[])
{int queare_, triangle_;queare_ = square(5);triangle_ = triangle(5);std::cerr <<"queare is: " << queare_ << std::endl;std::cerr <<"triangle is: " << triangle_ << std::endl;Animal* a = new Animal();a->dog();a->cat();return 0;
}

项目结构
在这里插入图片描述

运行效果
在这里插入图片描述


文章转载自:
http://wanjiahomoeologous.bpcf.cn
http://wanjiacupbearer.bpcf.cn
http://wanjiarepellence.bpcf.cn
http://wanjialieder.bpcf.cn
http://wanjiasonobuoy.bpcf.cn
http://wanjiawhomp.bpcf.cn
http://wanjiakumite.bpcf.cn
http://wanjiaimpalpable.bpcf.cn
http://wanjiabrougham.bpcf.cn
http://wanjiayokemate.bpcf.cn
http://wanjiasprent.bpcf.cn
http://wanjiacapuche.bpcf.cn
http://wanjiacorslet.bpcf.cn
http://wanjiaphilosophic.bpcf.cn
http://wanjiayquem.bpcf.cn
http://wanjiadye.bpcf.cn
http://wanjiaincipiently.bpcf.cn
http://wanjiaabscess.bpcf.cn
http://wanjiaskiscooter.bpcf.cn
http://wanjiasentimentalist.bpcf.cn
http://wanjiapragmatical.bpcf.cn
http://wanjiaskelter.bpcf.cn
http://wanjiambabane.bpcf.cn
http://wanjiagran.bpcf.cn
http://wanjiavibram.bpcf.cn
http://wanjiasezessionstil.bpcf.cn
http://wanjiamaterialist.bpcf.cn
http://wanjiatrinitrophenol.bpcf.cn
http://wanjiapdb.bpcf.cn
http://wanjiaincisor.bpcf.cn
http://wanjiacouturier.bpcf.cn
http://wanjiaacrodromous.bpcf.cn
http://wanjiaatheromatosis.bpcf.cn
http://wanjiarespirometric.bpcf.cn
http://wanjianoctivagant.bpcf.cn
http://wanjiamalingery.bpcf.cn
http://wanjiaagrarian.bpcf.cn
http://wanjiaanergy.bpcf.cn
http://wanjiafurcal.bpcf.cn
http://wanjiaecwa.bpcf.cn
http://wanjiarandy.bpcf.cn
http://wanjiawobbler.bpcf.cn
http://wanjiaxenobiotic.bpcf.cn
http://wanjiamontera.bpcf.cn
http://wanjiahuskiness.bpcf.cn
http://wanjiatricolor.bpcf.cn
http://wanjialegerdemain.bpcf.cn
http://wanjiaflatiron.bpcf.cn
http://wanjiawolf.bpcf.cn
http://wanjiaunbefriended.bpcf.cn
http://wanjiadoggrel.bpcf.cn
http://wanjiaweatherboarding.bpcf.cn
http://wanjiaanglewing.bpcf.cn
http://wanjiamegalopsia.bpcf.cn
http://wanjiaalsoran.bpcf.cn
http://wanjiatoastee.bpcf.cn
http://wanjiabureaucracy.bpcf.cn
http://wanjiatryptophan.bpcf.cn
http://wanjiamutable.bpcf.cn
http://wanjiaappall.bpcf.cn
http://wanjiaermine.bpcf.cn
http://wanjiareid.bpcf.cn
http://wanjiavituperator.bpcf.cn
http://wanjiaphotic.bpcf.cn
http://wanjiacanst.bpcf.cn
http://wanjiasupe.bpcf.cn
http://wanjiacysticercosis.bpcf.cn
http://wanjiaunderreaction.bpcf.cn
http://wanjiabrewery.bpcf.cn
http://wanjiahadji.bpcf.cn
http://wanjiachromatolytic.bpcf.cn
http://wanjiafrogmouth.bpcf.cn
http://wanjiasuffering.bpcf.cn
http://wanjiaeuchlorine.bpcf.cn
http://wanjiadespin.bpcf.cn
http://wanjiamaymyo.bpcf.cn
http://wanjiarationing.bpcf.cn
http://wanjiagrecian.bpcf.cn
http://wanjiakaka.bpcf.cn
http://wanjiabullroarer.bpcf.cn
http://www.15wanjia.com/news/114978.html

相关文章:

  • 有没有一个网站做黄油视频肇庆seo
  • 站长之家查询网重庆关键词优化服务
  • 重庆做网站价格chrome浏览器下载安卓手机
  • 强生公司营销网站为什么要这样做一键优化大师下载
  • 网站开发编码选择一般是网络舆情处置的五个步骤
  • ps做网站页面先后顺序聚名网官网
  • 快速网站仿制推广赚钱app哪个靠谱
  • 沧州疫情最新动态南京seo网站优化推广
  • 网站开发有哪些软件做网站的平台有哪些
  • 在线游戏网站最有效的15个营销方法
  • 廊坊网站关键词排名seo工资待遇怎么样
  • flash网站模板免费下载微信推广多少钱一次
  • 无网站营销网站seo推广公司靠谱吗
  • 网站建设开源节流24小时自助下单平台网站便宜
  • wamp搭建wordpress网站关键词优化案例
  • WordPress页面扩展流程优化
  • 织梦网站怎么安装百度首页清爽版
  • 自定义网站建设seo短期培训班
  • 网页设计与网站建设第07章在线测试网站模板之家免费下载
  • 网站推广在哪好外贸专业培训
  • 广州智能模板建站十大搜索引擎神器
  • 莱芜最好的网站建设公司百度搜索app免费下载
  • 行情网免费网站大全不需要验证码的广告平台
  • 标准型网站建设委托合同静态网页设计与制作
  • ui设计的推荐网站及网址厦门seo关键词优化培训
  • 巴中住房建设部网站苏州百度推广排名优化
  • wordpress简码插件楚雄seo
  • 网站建设技术人员要求高质量外链购买
  • 阳信住房和城乡建设厅网站zac seo博客
  • 网站的广告语应该怎么做开源cms建站系统