Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Help.. std::vector

Name: Anonymous 2008-08-15 4:10


#include <iostream>
#include <vector>
#include <string>
using std::cout;
using std::cin;
using std::string;
using std::vector;

int main(unsigned int argc, char** argv)
  {
  vector<int> ints;
  ints.push_back(1);
  ints.push_back(2);
  for(vector<int>::iterator iter = ints.begin(); iter!=ints.end(); iter++)
    cout<<"  "<<*iter<<"\n";
  cin.get();
  return 0;
  }


1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\xutility(708) : error C2504: 'x' : base class undefined
1>        c:\program files\microsoft visual studio 9.0\vc\include\xutility(734) : see reference to class template instantiation 'std::_Iterator_with_base<_Category,_Ty,_Diff,_Pointer,_Reference>' being compiled
1>        with
1>        [
1>            _Category=std::random_access_iterator_tag,
1>            _Ty=int,
1>            _Diff=std::allocator<int>::difference_type,
1>            _Pointer=const int *,
1>            _Reference=const int &
1>        ]
1>        c:\program files\microsoft visual studio 9.0\vc\include\vector(26) : see reference to class template instantiation 'std::_Ranit<_Ty,_Diff,_Pointer,_Reference>' being compiled
1>        with
1>        [
1>            _Ty=int,
1>            _Diff=std::allocator<int>::difference_type,
1>            _Pointer=const int *,
1>            _Reference=const int &
1>        ]
1>        c:\program files\microsoft visual studio 9.0\vc\include\vector(289) : see reference to class template instantiation 'std::_Vector_const_iterator<_Ty,_Alloc>' being compiled
1>        with
1>        [
1>            _Ty=int,
1>            _Alloc=std::allocator<int>
1>        ]
1>        c:\documents and settings\administrator\my documents\visual studio 2008\projects\test\test\main.cpp(14) : see reference to class template instantiation 'std::_Vector_iterator<_Ty,_Alloc>' being compiled
1>        with
1>        [
1>            _Ty=int,
1>            _Alloc=std::allocator<int>
1>        ]
1>Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Test\Test\Debug\BuildLog.htm"
1>Test - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========

Name: Anonymous 2008-08-21 17:01

Why don't you get over it? Last time I checked, programmers are supposed to help out other programmers. It's why we're > artists.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List