No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
9 Posted Topics
Hello, I have a rather complicated pointer/syntax problem. One of my function arguments is a pointer to a structure which contains a void pointer. If I point the pointer to a scalar then in my function I can access it like this: [ICODE] local_var = (appropriate_type *) struc->pointer; [/ICODE] But …
Hello, I am trying to make one patch transparent. What the documentation says about making only the specified object transparent is this: "alpha(object_handle,value) sets the transparency property only on the object identified by object_handle." However what I get is all pathces being transparent, even though I use ALPHA with a …
Hello, Could you explain me what this statement means? I am confused with k/=2 as iteration statement. [icode] for (int k = p; k > 0; k /= 2) [/icode] Thanks
Hello, I coded binary and Fibonacci search algorithms in Fortran and was trying to determine for what size of array Fibonacci search would become faster than the binary search. Unfortunately, what I get is the binary search being quicker on any given array. Here is my implementation of the Fibonacci …
Hello, I created an ArrayList with lists and arrays (randomly chosen) of queues and now need to get access to these lists and arrays to add, remove and display elements in them. How could I do this? I tried ArrayList methods like get(int index) and iterator(), but it just shows …
Hello, I am trying to write my first ever assignment in Java and am straggling with it. I have a superclass LivingThing and two subclasses, Monster and Human. Both subclasses have an attribute 'strength', but the maximum value of it is different for each of them. In my superclass I …
I'm a woman studying Computer Science. There are more and more of us doing Computing courses :) I am now learning both, Java and Haskell, and I enjoy them both. Although must admit that I find Haskell easier at the moment. I spend ages trying to find out why my …
Hello, Is there any way of reading words from a string containg a few words separated by white spaces using a loop? I don't know how many argumets the user will input. I wanted to do it like this: [code] for(i=0;i<wordCounter;i++) { sscanf(input,"%s",argument[i]); } [/code] But this keeps reading in …
Hello, I have to write a program using exec() where user can specify the pathname and arguments. I am trying to read in the arguments in the following way: [code] #include <stdio.h> #include <unistd.h> #include <sys/wait.h> int main() { ... int i; char *cmd[100]; char argument[100]; i = 0; for(i=0;i<3;i++) …
The End.
beatlea