Created
April 10, 2020 07:42
-
-
Save webber2408/b4c6563d4e7e1b90892447f422255d8d to your computer and use it in GitHub Desktop.
Class and Object example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
class Country{ | |
public: | |
string name; | |
int populationCount; | |
void storeCountryInformation(string s, int n){ | |
name = s; | |
populationCount = n; | |
} | |
}; | |
int main(){ | |
Country c1; | |
c1.storeCountryInformation("India", 1300000000); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment