Warnings 1,2,3,4: warning: comparison between pointer and integer
if (command[2] == '/') {
else if (command[2] == '*') {
Type: Posts; User: ammochck21
Warnings 1,2,3,4: warning: comparison between pointer and integer
if (command[2] == '/') {
else if (command[2] == '*') {
I will post the error messages in a second but I noticed that when I put the ; back in after the if statement:
if(strcmp(command[0], "cd") == 0); { //SEG FAULT HERE!!!
dir =...
Ok thanks for your help....cant believe I couldnt see the semi-colon! And I did have command in there...dont know why its not in there in this code...I had it defined somewhere else...which was...
This is driving me nuts! I dont know much about C so I cant find what I am doing wrong but I have debugged it to the point that I know where I am getting a Seg. Fault but dont know why:
void...
Tabstop you always help me!
however, what i have in the pseudocode is what i have in the program but it is STILL storing the stupid neg sign! I dont know whats going on. Maybe my for loop is...
well if i do nothing then it will still read it in and put it in spot 1. I know i need it for future tasks in this assignment, but I do not want it to be stored in the array, at all. That is where...
I got my average function working, but I still cant do anything with the neg. sign. I tried having a string variable hold the neg. sign, but then it prints 0's in front of all my numbers. Please...
ok and thats my problem. I only know how to do cin.ignore, but the number has already been read in, so how would I do ignore? you cant just do ignore() right?
well i started doing that, but what happens after the flag gets set to true. Does the neg sign get ignored after that?
Hey everyone- I am having trouble with structs...grrrr. I am trying to ignore the - sign in the beginning of the number so I can compute the average. I cant seem to remember how to just ignore the...
I am having trouble seeing what this code is doing. I keep getting flag[i] as the only on going into the critical section, which obviously means I am missing something! This isnt homework and I...
Thanks that makes sense to me! So then would I still need that while loop I have right above it if I do all string compares?
hey guys,
ok right now I am trying to enter some input, for example, 'cd'. right now it will get and print the current directory I am in. but when I enter anything, it exits out of my prog....
and what is pipecount for?
i know pipe() is used for process to communicate with each...right? my TA said I needed pipecount in there, but i guess I dont really understand it....boy do I feel...
yeah i know i took those out...
Ok well going back to my read_parse.......
can you explain to me what char *comm, char command[], and input_string[mystring] should be doing with relation to each other?
I think I am confusing...
Hey all,
This is my first time programming in C, but i am used to C++ so i am trying to use the same layout as I would with C++ for my program. I am a little confused about the chdir() part of...
I got it...nevermind :) thanks so much!!!
ok well your right it works now...i dont know if removing the semicolon made it work but it does.
i now have to add all of the sum's to get a final total...any suggestions?
Job# ...
for the S input...it will read te first number which tells it how many sizes it need to read in.
So for S 5 12 3 10 7 16
it reads in num which is 5.
it should go through the for loop 5...
so what do i need to do for the S loop...i see what your saying...but i dont know what to do to fix it...i ran through it by hand...and it worked...but I am also not a computer... thanks!
I cant BELIEVE it was that tiny little thing!!!!!! THANK YOU!!!!!!!!!!!!!!!!! It works now! :)
ok here is the whole code I have written.....this wont work for the commented out parts:
cin >> jobnum;
while (!cin.eof())
{
cin >> code;
while(code!='Q')
when i read in the size and printed out to see what its reading in...it only prints an M.....the spaces get skipped with what we are doing....so its not really going through the for loop until i =...
well its reading the first M....but then thats it....its not going back through the loop to get the other sizes...yes S = 35, M=100 and L = 500. so since the first data set is
P 3 M M S it...