Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- using namespace std;
- class produto_preco{
- public:
- std:: string nome;
- float preco;
- };
- int main ()
- {
- produto_preco p;
- p.nome = "arroz";
- p.preco = 5.90;
- std::cout << "nome:" <<p.nome << std::endl;
- std::cout <<"preco:" <<p.preco << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement