I'm using an online compiler so that could be an issue. That line checks if the value of 20 is assigned to the variable "zone". If the user inputs 20 for zone then that if statement should run.
Type: Posts; User: MSkiLLz
I'm using an online compiler so that could be an issue. That line checks if the value of 20 is assigned to the variable "zone". If the user inputs 20 for zone then that if statement should run.
Thanks. I'm still learning for forgive me if my questions are basic. On the line I use the "else if" I get this warning. "warning: suggest parentheses around assignment used as truth value". I...
I keep getting that error on this line. "speed - zone = amount;" What did I do wrong? thanks
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
Its supposed to wait on the other process to finish writing. The author says "One wants to write the data and another wants to read the data to the shared memory."
So I'm guessing it reads while...
Well, how exactly will it be implemented? I'm still sort of a novice at this stuff. Like I said, this is just a sample code that I want to run to understand shared memory. I included the wait header...
#include <iostream.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <unistd.h>
#include <stdlib.h>
#define SHMSZ 1024
Well, I've tried both "int wait()" and "void wait()" and I get the same outcome.
Ok, I declared wait and now it gives me this error. No idea what this means.
/tmp/ccjgTrxM.o: In function `main':
/tmp/ccjgTrxM.o(.text+0x212): undefined reference to `wait(void)'
collect2: ld...
I'm trying to run this sample code and I keep getting this error:
"process1.cpp:92: implicit declaration of function `int wait(...)' "
I thought the error was that I didn't include a specific...
so you can communicate between processes using stdin and stdout?
Alright one more thing about this code. I'm trying to get the parent to display the counts and the child to display its pid but when I editted it nothing shows on the screen.
#include...
I update my code. I need help with the character array. I'm not sure if I doing it right but im trying to get the program to ask the user to add a value to the character that is being displayed.
...
Could anyone tell me what the compiler is?
Is there a way I can use this vendor supplied compiler?
I'm trying to figure out how to write out this code. These are the 3 steps...
1. Parent reads from a file “input.txt” and writes into a pipe A that connects to
child process #1.
2. Child process...
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
I'm using the gcc command and executing it with ./a.out.
Sorry for the double post but can someone tell me why the outputs I get are extremely large for the last code posted?
Windows Vista.
Oh. I guess I should ask you what you used and try that out.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
pid_t childpid;
int count[2];
int fd[2];
int m;
Yeah. I'm using the same code. Maybe its my compiler? I'm using PuTTy.
The outputs I get are "1075122321 and those of 3 are 1073836614". I was wondering if having a larger buffer would make this program work right but I noticed that you took it off. What could be...
Yes. The parent counts the multiples of 5 and the values that aren't multiples are passed to the child to count the multiples of 3. After that the parent displays both the count values of child and...
here it is. Sorry if y'all don't understand what i've added since I'm mostly doing trail and error over here.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
...