The jump can be conditional, for example, JUMPZERO number
The program will only jump to line "number" if the top of the stack is 0. The JUMP is never ignored, so this kind of input file will not be...
Type: Posts; User: Lost__Soul
The jump can be conditional, for example, JUMPZERO number
The program will only jump to line "number" if the top of the stack is 0. The JUMP is never ignored, so this kind of input file will not be...
Well,thnks a lot, this is way to advanced for a begginner like me so i have to read it carefully.
Tried a search in google but found no "implementable" algorhitm...Can you give me some idea of what i have to do? i dont need any code, just some ideas. The cache would work similar to an hash...
Believe me,it doesnt...In my university we got used to find the most eficient solution, and since i was told that the program wont take more than a minute,even with the big files, i have to make it...
I´ve parsed the line.
Well, the list would have as many ~elements as the commands. Imagine i want to access the 1,500,000º command, i would have to read 1,499,999 commands before i find the...
Well, that would be good, but i cant limit the jump...
There´s no "predetermined maximum number of commands". Like i said, the array option will have a memory problem, billions of commands would require an array with billions of positions...And the...
I developed a program that is an rpn calculator. For those who dont know what an RPN calculator is,it works similar to assembly programming language. An input file would look like this:
PUSH 1
PUSH...
Ok,here´s what i have done so far:
int main(int argc,char *argv[])
{
FILE *fp;
char comando[20];
char argumento[20];
int arg_numerico;
fp=fopen(argv[1],"r");
ok,but how do i read and declare it?
char argument[20];
fscanf(file,"%s",argument)?
and then use that atoi thing?
I´m now working on a new project :D
I´m having a problem,though:
The program receives commands similar to assembly commands
PUSH,POP,MUL and so on.The problem is ,sometimes there´s the command...
yep,but i wanted the longest path one...i tried to reduce the number of calculations in my algoritm,but still too much time.do u know where i can find an implementation of the longest path...
Well,this post is related to my last one(that program to calculate the maximum flow along a directed graph: Post - "segmentation fault")
I have been quite occupied in the last few days so only...
Weel,since i have to move forward at least once,i´m going to do like this:find the first path,then move backwards,but when i move backwards,some variable similar to maxpeso already knows the sum from...
I see...I guess i have to search for another algorithm,since this one was created by me,i heard about something called the algorithm for the longuest paths that could be useful,dont know exactly...
Guess not...Daam, i have to delivery the project Monday and i still dont know what can i do...Someone could at least tell me if the problem is related to memory,like my friend said?too many elements...
So...No one has any idea if this might be my problem?Or any way of solving it with a temp file...?
I may have a clue about what going wrong.A friend of mine analized the program and said that probably memory is not enough to store all the elements of the lists. That would explain a lot of...
Ok,i guess today i have the proof that the problem inst the time the program takes to compute all the flows.I left it working during the night with t4 in.After 11 hours working still no result.I...
Well,thnks for trying to find the mistake.the second possible error you mentioned isnt happening,since with t5 and t6 i get the same "infinite cycle".Looking at the percurso array in each call didnt...
why isnt anyone replying...Is anyone at least trying to run my code with t4 and t5 and try to see what´s wrong with it...?Or do i have to try elsewhere?i asked a lot of persons and the only thing...
I´ve updated the code again(just small changes related to the machines where the programs are tested)...Still "the problem"...
Anyone tried to run the debug...?Just getting a little worried...I spent one hour looking at all the sums in t6.in and saw no infinite cycle...It just closed...If the sums are different, if its...
i have no problem with recursion...i had one a few days ago, which was causing a stack overflow,but not now...only a infinite cycle with big files...try to read all the posts, the recursion problem...
Well,i guess u really arent understanding my code,since there´s no conflict what so ever...I´ll try to write more commentarys.And,please, try to be more attentive to the other replys to my post:The...