Alright, I solved this problem. Works perfect. A little complicated for my level but figured out finally.
Segmentation fault is solved by using a loop structure for the vector.
I was giving random...
Type: Posts; User: Adaptron
Alright, I solved this problem. Works perfect. A little complicated for my level but figured out finally.
Segmentation fault is solved by using a loop structure for the vector.
I was giving random...
Actually, I messed it up. I have to use vector of vectors, I think.
Because, I can get the first vector element but after that I get segmentation fault error.
What options do I have? I am trying to create a dynamic vector of objects and then return a pointer this array in another function.
Actually, this method also didn't work because I am having...
Ok. Finally got this I think.
I am doing something like this
// Run the matching algorithm
vector<Match*> matchingUsers = showMatches(client);
cout <<...
Nobody has answered how to access the class methods through a pointer to a vector though.
How can I access to the class methods though?
For instance:
users->setName(extract name from file);
users->setAge(extract age from file);
I hope I can explain what I need to do, that is how lost I am.
Let's say you have a simple class User. For this purpose let's say really simple class.
What I am trying to do is to return a vector...
Thank you for sharing.
How did you tag your code so that it shows the line numbers?
Cannot believe I asked this questions. Sorry for wasting your time.
Used parentheses instead of brackets. It's getting late.
Hello everyone,
I am getting this error
std::vector<std::basic_string<char> >) (unsigned int&)'|
and cannot figure out what I am doing wrong. There might be more mistakes but cannot pass this...
Perfect. This works.
Thank you so much.
Text file is this
Store 1
100
Store 2
200
This is basically it.
This is not a homework but just a self study.
I am trying to read the information from inputFile and then loop through the data and display it. However; the below code falls into infinite loop....