Forum: C++ Apr 3rd, 2009 |
| Replies: 4 Views: 468 Thanks for all your good advice, but the function that takes a structure containing that generic pointer already exists. It's one of a library functions that I'm trying to use. So I cannot change... |
Forum: C++ Apr 2nd, 2009 |
| Replies: 4 Views: 468 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... |
Forum: Legacy and Other Languages Nov 11th, 2008 |
| Replies: 0 Views: 1,158 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... |
Forum: C Jul 7th, 2008 |
| Replies: 6 Views: 615 I can see it now. Thank you for the explanation. |
Forum: C Jul 4th, 2008 |
| Replies: 6 Views: 615 I see. It's confusing having k=k/2 written that way.
But then why do you say it will function once? If we start from positive p and keep halving it, we would never reach a value <= 0, so it would... |
Forum: C Jul 4th, 2008 |
| Replies: 6 Views: 615 Hello,
Could you explain me what this statement means? I am confused with k/=2 as iteration statement.
for (int k = p; k > 0; k /= 2)
Thanks |
Forum: Legacy and Other Languages Jun 23rd, 2008 |
| Replies: 1 Views: 1,340 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... |
Forum: Java Apr 19th, 2008 |
| Replies: 6 Views: 3,471 Thanks. This helped a lot. The program works fine now :) |
Forum: Java Apr 18th, 2008 |
| Replies: 6 Views: 3,471 This is what I get now :(
'Exception in thread "main" java.lang.ClassCastException: AQueue cannot be cast to java.util.ArrayList'
I can cast it to FIFO, which is my interface, and retrieve it... |
Forum: Java Apr 18th, 2008 |
| Replies: 6 Views: 3,471 Thank you very much!
The reason is simple: this is what my assignment brief is telling me to do ;) It says 'This will allow to practice with ArrayList and allow you to use generics, if you wish.'... |
Forum: Java Apr 18th, 2008 |
| Replies: 6 Views: 3,471 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?... |
Forum: Java Mar 6th, 2008 |
| Replies: 6 Views: 1,001 So the less parameters the better? I thought that it was better to send the arguments which are the same for all subclasses up to their superclass.
Could you also advice me on menu class? I have... |
Forum: Java Mar 5th, 2008 |
| Replies: 6 Views: 1,001 I've tried both these methods before, but they set maxStrength too late. In my subclass I call superclass constructor and one of its parameters is strength, which then is checked in setStrength() and... |
Forum: Java Mar 4th, 2008 |
| Replies: 6 Views: 1,001 Works like this :) Thanks! |
Forum: Java Mar 4th, 2008 |
| Replies: 6 Views: 1,001 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... |
Forum: IT Professionals' Lounge Feb 21st, 2008 |
| Replies: 37 Views: 4,313 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... |
Forum: C Oct 16th, 2007 |
| Replies: 6 Views: 2,540 Yes, I did try it and all I got was a compiler error. It doesn't like src += n;
error: invalid operands to binary + |
Forum: C Oct 16th, 2007 |
| Replies: 6 Views: 2,540 Sorry, but I don't understand this code :( Why do you have to use puts(word) after reading in to word with sscanf? And what does += do? |
Forum: C Oct 16th, 2007 |
| Replies: 6 Views: 2,540 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:
... |
Forum: C Oct 15th, 2007 |
| Replies: 7 Views: 3,366 Yes, I understand it now. Thank you.
I don't know how many strings I need. |
Forum: C Oct 15th, 2007 |
| Replies: 7 Views: 3,366 I see. I used an array of strings as you adviced me and it works like this. Thank you.
Yes, I was trying to copy it. Is it fine or should I rather malloc cmd and point it to the input directly... |
Forum: C Oct 15th, 2007 |
| Replies: 7 Views: 3,366 I thought so, but if I do it as:
cmd[0]="some_string";
cmd[1]="another_string";
etc.
it works fine. |
Forum: C Oct 15th, 2007 |
| Replies: 7 Views: 3,366 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:
#include <stdio.h>
#include <unistd.h>... |