Thanks, was using pointer just becuase thats the way I had a vector of lists set up before. Just wanted to pick up the concept of how to work a list of list and wasn't sure how.
Type: Posts; User: Kirmie
Thanks, was using pointer just becuase thats the way I had a vector of lists set up before. Just wanted to pick up the concept of how to work a list of list and wasn't sure how.
Not sure since I don't use the Borland compilers needed for conio.h but when I remove that I get a message about unkown storage size of Array which may be your problem since its size needs to be...
How would I access a list inside a list? Say for...
list<int> inside;
list<list<int>* > outside;
list<list<int> *>::iterator outIter;
list<int>:: iterator inIter;...
Just remove the () from object obj(); and as long as obj.x is inside of a function like main you are set. Outside won't work.
I got the right header in. rand_r is a function in stdlib.h. It should be written as
int rand_r(unsigned int * seedptr);
by what I've found in man and about 10 other websites.
I have even...
#include <stdlib.h>
typedef struct {
pthread_t myTid;
int myId;
unsigned int seed;
pthread_cond_t myCv;
} State;
State states[8];
Figured it out. Need to put \ before it. Tried putting in ' ' but that gave me an error.
How would I remove the " character from a string. The only way in which I know how to remove a character is by putting it within "s. like
string stripPBreaks(string s) {
int br;
...
Yeah, I figured that out right before after I submitted it. Sad thing is that I have been working on that for about 2 hours now.
This is what I have been trying lately and I cant figure out why it is getting a segmentation fault since there is a number in the list and I can get the list to work by itself. The output is just 1...
I'm having problems accessing a list inside a vector. Bascially, how would I add a value to a list inside a vector with push_back()? Everything I have tried so far has just given me a segmentation...