   How do I instantiate a pointer to a vector?
    vector<int> * Case=0;    Case->resize(4);   Case[0]=1;Case[1]=0;Case[2]=0;Case[3]=0;I am getting the following error:C:\Program Files\Microsoft Visual Studio\MyProjects\DealorNo\main.cpp(58) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const int' (or there is no acceptable conversion)How do i initialize a pointer to vector element?   
  first line should read:vector<int> * Case = new vector<int>;but are you sure you want to do this? :)You probably just want to do vector<int> Case;   ;std::vector<int>* Case = new std::vector<int>(4);(*Case)[0] = 1;// ...delete Case;But you probably wantstd::vector<int> Case(4);Case[0] = 1;;  Still get the same error with your suggestions   ;Quote:Original post by Deek880Still get the same error with your suggestionsDon't use a pointer to vector. A vector is already managing a pointer internally, and the double-indirection doesn't gain you anything.   ;  I'm trying to call a function with a vector at runtime that use the rand ()standard cstdlib.I want to call it several times with a different seed value to get a new value each time it is called. I believe it's not working because the seed value is being generated at compile time instead of run time. I'm trying to see wether I can resolve this with pointers   ;  You should only make one call to srand() at the beginning of your program.  You shouldn't call it again after that.  The random generator maintains an internal state, and each time you call srand() it resets that internal state.  Just let it do its business and maintain its own state and only call srand() once.Using pointers will not fix this.  It's not a matter of things being determined at compile time vs runtime.  You shouldn't call srand() more than once.   