Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- namespace variavel1{
- int tm;
- }
- // Use scope resolution operator
- namespace variavel2 {
- int receive1, receive2, receive3;
- }
- int main(){
- using namespace variavel1;
- vector <int> v(3);
- variavel2::receive1 = v[0] = 100;
- variavel2::receive2 = v[1] = 200;
- variavel2::receive3 = v[2] = 600;
- variavel1::tm = v.size();
- for (int i = 0; i <variavel1::tm; i++) {
- cout << v[i] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement