What if I create an array of 10 integers... like x[10] for example.
I'd need two values to keep track of the input location (for the producer) and one for the output position for the consumer). ...
Type: Posts; User: AvengedGoat
What if I create an array of 10 integers... like x[10] for example.
I'd need two values to keep track of the input location (for the producer) and one for the output position for the consumer). ...
There will be two threads... one picking from my input file and putting each line into the queue (up to 10 lines capacity)... then (and while the producer thread is doing that), the consumer thread...
Well, I want to make it a fixed size because I want to simulate the producer/consumer methodology. So that when the queue is "full," the producer thread will stop taking from the input file. It's...
Also,
how do I set the size of a queue? Is there a simple way to do this? I know of a way to set the size of an array in one line, is there a similar way of doing this?
I want to set the size...
I'm going to use a Queue because that's more like a circular array.. first in first out kind of deal.
But I have another question.. I want to have a thread that reads from a file, puts each "line"...
I am having trouble starting this program, but I'm sure if I get a little hint on a direction to take, I'll be good to go.
I want to create a program that has multiple threads that takes lines...
Well, the way I would compile my program would be remotely through a Linux machine running Gcc. I hope this information will aid you in helping me write this program.
Reading and writing will...
Also, how do I create threads using C++ on a Windows machine? Thanks for the help.
Hello all,
I want to write a program that uses multiple threads that does the following:
Opens a simple text file containing AT LEAST 500 KB of data
a reads a line of the file into a...