10 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Rootz

When I try to compile my code in visual basic 2010 it gives me the error 1903 and when I compile the code in Code::Blocks it opens the standard template library's algorithm.h file and takes me to line 2163 if (*__i < *__first) I don't want to modify anything here, …

Member Avatar for Rootz
0
820
Member Avatar for sergent

I decided to learn C++ STL and I was exprimenting with STL containers. I saw this example [here](http://www.cplusplus.com/reference/stl/vector/insert/): // inserting into a vector #include <iostream> #include <vector> using namespace std; int main () { vector<int> myvector (3,100); vector<int>::iterator it; it = myvector.begin(); it = myvector.insert ( it , 200 ); …

Member Avatar for sergent
0
324
Member Avatar for hamby

Hi i'm making a function that will return make a series of strings and perform a function returning a value for each. I've stored the strings in one vector v, and the integer values in another v2. Then it is supposed to return the string that corresponds to the smallest …

Member Avatar for hamby
0
7K
Member Avatar for nocloud

I have a the following snippet of code [CODE]string const& symbol::at(int index) const { assert(index<symbol_data.vector::size()); return symbol_data.vector::at(index); }[/CODE] This does not compile successfully, instead, I get complaints about [CODE]error: ‘template<class _Tp, class _Alloc> class std::vector’ used without template parameters[/CODE] Now, I think this has something to do with the fact …

Member Avatar for mrnutty
0
323
Member Avatar for niranga

Hi All, Is it possible to bind an array or a Vector with a event listener? For an example if we add an element to the Vector or remove from the Vector, can I use an event listener to track the changes? Thanks a lot in advance. Cheers..!!

Member Avatar for niranga
0
980
Member Avatar for fibbo

Alright, I suspect there is already a solution here somewhere on the forums but I'm not quite sure I'm searching for the right terms so I hope you dont mind me asking the question anyway. My goal is to make a constructor for a class called building. instance variables are: …

Member Avatar for mike_2000_17
0
2K
Member Avatar for KansaiRobot

Hello All. This is my first post. I would really appreciate if you can help me in a project I have to complete as soon as possible anyway, the thing is this: I have a bunch of numerical data in any format (say an excel page with 3D vectors, or …

Member Avatar for KansaiRobot
0
185
Member Avatar for bensewards

Hey everyone, In my COMP 208 class, I was asked to do the following: "Redo Lab 2 Problem 2, only this time use vectors to hold the names and gpa’s instead of arrays. So you will work with 2 vectors, one holding the gpa’s (type double) and the other holding …

Member Avatar for user422
0
196
Member Avatar for Lord_Migit

Hey folks, just a quick question i can't seem to find the answer to. If i overwrite a container with a pointer in it, does the pointer and therefore the object it points to still exist, and would that be considered a bad handling of memory. For instance. I have …

Member Avatar for Lord_Migit
0
138
Member Avatar for bensewards

Hey everyone, I need to write a program that reads names and GPA’s from a text file. The file looks like: James 3.9 Margaret 3.5 Charles 1.2 Jennifer 4.0 The program sorts the students ascending by gpa, and prints the sorted list including names. To keep the names with the …

Member Avatar for ravenous
0
1K

The End.