Skip to content

Instantly share code, notes, and snippets.

@samverneck
Created May 12, 2017 17:03
Show Gist options
  • Save samverneck/3d9026724430e9554d9da6f05f0713df to your computer and use it in GitHub Desktop.
Save samverneck/3d9026724430e9554d9da6f05f0713df to your computer and use it in GitHub Desktop.
#include <cstdlib>
#include <string>
#include <iostream>
using namespace std;
// conceito
class Carro {
public:
string: marca;
int ano;
string: cor;
};
int main (int argc, char** argv) {
Carro c1;
c1.marca = "Fiat";
c1.ano = 2017;
Carro c2;
c2.marca = "Ferrari";
c2.ano = 2016;
cout << c1.marca << endl;
cout << c2.marca << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment