DiffEncode problem

3 views
Skip to first unread message

Andrew Watson

unread,
Nov 5, 2011, 4:20:04 PM11/5/11
to asu-cse-494598-...@googlegroups.com, mca...@gmail.com
Ayan,

There is a variable "input" that is never initialized in diffencod.c and it is never set to anything. 
We are not sure how it is used or how it should be translated to Java.  Java will not allow us to compile unless it is initialized to something.  What is the intention behind the variable, and how should we initialize it in Java?

Please advise.
Andrew

ayan banerjee

unread,
Nov 5, 2011, 10:53:40 PM11/5/11
to asu-cse-494598-...@googlegroups.com
If it is not used anywhere, then no need to declare it.

Ayan

Michael Castaneda

unread,
Nov 6, 2011, 12:39:21 AM11/6/11
to asu-cse-494598-...@googlegroups.com
It is being set in an array but the value is indeterminate since it was never initialized. In C this will actually compile even though the value wasn't initialized, but this won't compile in Java. I'm assuming the "input" variable was supposed to be initialized and that this was not intentional.

ayan banerjee

unread,
Nov 6, 2011, 1:20:03 AM11/6/11
to asu-cse-494598-...@googlegroups.com
oo ok then just initialize the input by some random numbers. 

That input vector is in your control. You can change it.
Reply all
Reply to author
Forward
0 new messages