Skip to content

Instantly share code, notes, and snippets.

@webber2408
Created April 10, 2020 07:42
Show Gist options
  • Save webber2408/b4c6563d4e7e1b90892447f422255d8d to your computer and use it in GitHub Desktop.
Save webber2408/b4c6563d4e7e1b90892447f422255d8d to your computer and use it in GitHub Desktop.
Class and Object example
#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