[ create a new paste ] login | about

Link: http://codepad.org/n8fJhz6l    [ raw code | output | fork ]

C++, pasted on Jan 13:
1
2
3
4
5
6
7
8
9
10
struct T {
   std::vector<int> v;
   int w;
   
   T(int w) : w(w), v(0, w) {}
};

int main() {
   T t(3);
}


Output:
1
2
3
4
5
cc1plus: warnings being treated as errors
t.cpp: In constructor 'T::T(int)':
Line 3: warning: 'T::w' will be initialized after
Line 2: warning:   '__gnu_debug_def::vector<int, std::allocator<int> > T::v'
Line 5: warning:   when initialized here


Create a new paste based on this one


Comments: