#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:
Anonymous2008-08-15 4:16
b:\>g++ -o go -x c++ -
#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;
}
^Z
b:\>go
1
2
^Z
b:\>
HAHAHAHA SUCKS TO BE YOU, SAY HI TO BILL FOR ME
Name:
Anonymous2008-08-15 9:07
Check your includes in the VC++ config.
Name:
Anonymous2008-08-15 9:12
>>3-kun, this is message board about programming, not configuring proprietary compilers. Don't help him.
I'M MCCARTHY
SON OF A BITCH HASKELL
HASKELL IS PIG
DO YOU WANT A MONAD?
DO YOU WANT STATIC TYPING?
SIMON PEYTON JONES IS A MURDERER
FUCKING SYNTAX
Name:
152008-08-21 23:28
>>16
Before your post I thought >>14 meant "becoming artists" or something like that, but now that I can see it expressed in beautiful sexpr I understand much better.
I have been involuntary trolled.
Name:
Anonymous2008-08-22 3:31
>>21
I'M MCCARTHY
SON OF A BITCH HASKELL
HASKELL IS PIG
DO YOU WANT A MONAD?
DO YOU WANT STATIC TYPING?
SIMON PEYTON JONES IS A MURDERER
FUCKING SYNTAX
Name:
Anonymous2009-03-06 11:09
Sheer lack of support for newbies by newbies On the one true path to leadership and direction is to not use it for sysadmin tasks or text munging Of course I pronounce it queen.