开发环境:Eclipse IDE for C/C++ Developers
编译成功后,在Binaries ,run in local 后在控制台就可看到结果.
https://www.w3schools.in/cplusplus-tutorial/inheritance/
//============================================================================ // Name : CPlusProject.cpp // Author : William // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; class Calc { public: int val2; Calc(int x) { val2=x; } }; class stud { public: char name[30],clas[10]; int rol,age; string myname; void enter() { // cout<<"Enter Student Name: "; cin>>name; // cout<<"Enter Student Age: "; cin>>age; // cout<<"Enter Student Roll number: "; cin>>rol; // cout<<"Enter Student Class: "; cin>>clas; // cout<<"Enter Student Name: "; cin>>myname; } void display() { cout<<"\n Age\tName\tR.No.\tClass"; cout<<"\n"<<age<<"\t"<<name<<"\t"<<rol<<"\t"<<clas; cout<<"\n"<<myname; } }; class studx { protected: int roll, m1, m2; public: void get() { cout << "Enter the Roll No.: "; cin >> roll; cout << "Enter the two highest marks: "; cin >> m1 >> m2; } }; class extracurriculam { protected: int xm; public: void getsm() { cout << "\nEnter the mark for Extra Curriculam Activities: "; cin >> xm; } }; class output : public studx, public extracurriculam { int tot, avg; public: void display() { tot = (m1 + m2 + xm); avg = tot / 3; cout << "\n\n\tRoll No : " << roll << "\n\tTotal : " << tot; cout << "\n\tAverage : " << avg; } }; int main() { // std::cout<<"This is my first C++ Program."; // std::cout<<std::endl<<"and its very easy William"; const int SIDE = 60; int area; area = SIDE*SIDE; std::cout<<"Area:\n" << area ; cout<<"\n William Test C++"; int a = 15, b = 10; if (b > a) { cout << "\nb is greater" << endl; }else{ cout << "\na is greater" << endl; } if(area > 3000){ cout << " 111" << endl;; }else{ cout << " 222" << endl;; } int age[5]={2,25,30,32,35}; cout<<"\n " << age[1]; cout<<"\n sizeof: " << sizeof(age); cout<<"\n sizeof: " << sizeof(age)/sizeof(age[0]); for(int n=0;n<sizeof(age)/sizeof(age[0]);n++) { cout<<"\n " << age[n]; age[n] = age[n] + 100; } for(int n=0;n<sizeof(age)/sizeof(age[0]);n++) { } for(int n=0;n<sizeof(age)/sizeof(age[0]);n++) { cout<<"\n " << age[n]; } cout << endl; int n = 20, *ptr; /* actual and pointer variable declaration */ ptr = &n; /* store address of n in pointer variable*/ cout << "Address of n variable: " << &n << endl; cout << "Address stored in pntr variable: " << ptr << endl; cout << "Value of *pntr variable: " << *ptr << endl; // char *name; // name = "Hello world 1"; // cout << "Value of *name variable: " << *name << endl; string str; str="Hello World 2"; cout << "Value of str variable: " << str << endl; stud s; Calc c1(10); Calc c2(20); Calc c3(30); cout << c1.val2; cout << c2.val2; cout << c3.val2; // s.enter(); // s.display(); // cin.get();//use this to wait for a keypress output O; O.get(); O.getsm(); O.display(); return 0; }
相关推荐
that machine learning has become one of the most exciting technologies of our time and age. Large companies, such as Google, Facebook, Apple, Amazon, and IBM, heavily invest in machine learning ...
Python Machine Learning Machine Learning and Deep Learning with Python, scikit-learn, and TensorFlow, 2nd Edition 很受推荐
Get started with MATLAB for deep learning and AI with this in-depth primer. In this book, you start with machine learning fundamentals, then move on to neural networks, deep learning, and then ...
Python Machine Learning and Deep Learning with Python, scikit-learn and Tensorflow (Step-by-Step Tutorial For Beginners)
Implement machine learning models in your iOS applications. This short work begins by reviewing the primary principals of machine learning and then moves on to discussing more advanced topics, such as...
Deep Learning: Practical Neural Networks with Java by Yusuke Sugomori English | 8 Jun. 2017 | ASIN: B071GC77N9 | 1057 Pages | AZW3 | 20.28 MB Build and run intelligent applications by leveraging key ...
This book is about a solution to these more intuitive problems. This solution is to allow computers to learn from experience and understand the ...this reason, we call this approach to AI deep learning.
machine learning课件(国外大学) machine learning课件(国外大学) machine learning课件(国外大学) machine learning课件(国外大学) machine learning课件(国外大学) machine learning课件(国外大学) ...
Learning TensorFlow A Guide to Building Deep Learning Systems 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Pratap Dangeti, "Statistics for Machine Learning" English | ISBN: 1788295757 | 2017 | EPUB | 311 pages | 12 MB Key Features Learn about the statistics behind powerful predictive models with p-value, ...
Thoughtful Machine Learning with Python: A Test-Driven Approach English | 25 Aug. 2016 | ISBN: 1491924136 | 250 Pages | AZW3/MOBI/EPUB/PDF (conv) | 16.77 MB By teaching you how to code machine-...
关于Combining active learning and semi-supervised learning to construct SVM classifier的文章
We discuss several consequences of our results on deep learning, one-shot learning and curriculum learning. Unlike statistical learning theory, the proposed learning theory analyzes each ...
赠送jar包:deeplearning4j-nn-1.0.0-M1.1.jar; 赠送原API文档:deeplearning4j-nn-1.0.0-M1.1-javadoc.jar; 赠送源代码:deeplearning4j-nn-1.0.0-M1.1-sources.jar; 赠送Maven依赖信息文件:deeplearning4j-nn-...
In the 1990s, a new type of learning algorithm was developed, based on results from statistical learning theory: the Support Vector Machine (SVM). This gave rise to a new class of theoretically ...
About This Book, Leverage Python' s most powerful open-source libraries for deep learning, data wrangling, and data visualization, Learn effective strategies and best practices to improve and optimize...
Human-in-the-Loop Machine Learning lays out methods for humans and machines to work together effectively. Summary Most machine learning systems that are deployed in the world today learn from human ...
Training Simple Machine Learning Algorithms for Classification A Tour of Machine Learning Classifiers Using Scikit-Learn Building Good Training Sets - Data Preprocessing Compressing Data via ...
Deep Learning in Python: Master Data Science and Machine Learning with Modern Neural Networks written in Python, Theano, and TensorFlow (Machine Learning in Python) by LazyProgrammer English | March ...