Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<thread>
- using namespace std;
- class Aviao{
- public:
- int vel = 0;
- void imprime(){ cout << "imressões";} // meu método
- };
- int main(){
- Aviao *av1=new Aviao();
- thread first(meu_método_imprime()_aqui); // meu método dentro da thread
- first.detach();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement