Forum: C++ May 29th, 2008 |
| Replies: 9 Views: 2,647 If there is truly a legitimate reason for a subclass to want to access a field, it should be declared "protected". |
Forum: C++ May 29th, 2008 |
| Replies: 7 Views: 1,810 These are identical. It is a pointer in both cases. So I guess it may be more clear to write it as a pointer. The second case might cause beginners to think that you are passing an entire array by... |
Forum: C++ May 11th, 2008 |
| Replies: 7 Views: 935 Also, a fundamental problem with your grow() function:
The last line is completely useless, because "array" is a local variable, assigning it has no effect outside the function. |
Forum: C++ May 2nd, 2008 |
| Replies: 7 Views: 594 wow.
what did you expect that code to do? |
Forum: C++ May 2nd, 2008 |
| Replies: 4 Views: 569 except that it doesn't check bounds |
Forum: C++ May 1st, 2008 |
| Replies: 5 Views: 704 just download it from the sourceforge project
http://sourceforge.net/projects/dev-cpp/ |
Forum: C++ Apr 29th, 2008 |
| Replies: 2 Views: 414 you need to make the method in the base class virtual
http://en.wikipedia.org/wiki/Virtual_function |
Forum: Java Apr 26th, 2008 |
| Replies: 7 Views: 860 you could either get all the digits out into a list or something, and then parse them back into a number in reverse
or just take the input as a string and reverse the string |
Forum: C++ Apr 24th, 2008 |
| Replies: 14 Views: 4,312 note that with any two numbers a and b, a * b = gcd(a, b) * lcm(a, b) |
Forum: Java Apr 14th, 2008 |
| Replies: 6 Views: 761 can we see more code? for example, what types are all these things? how are they defined? |
Forum: Java Apr 13th, 2008 |
| Replies: 6 Views: 761 This line makes no sense; you are getting the value that is associated with the key "info", and then you are testing whether that value is a key in the hash table? |
Forum: C++ Apr 12th, 2008 |
| Replies: 3 Views: 574 maybe you are using a C compiler instead of C++ |
Forum: Java Apr 11th, 2008 |
| Replies: 3 Views: 1,172 um... where is your code? |
Forum: C++ Apr 10th, 2008 |
| Replies: 7 Views: 1,660 I think this will be possible in the next version of C++ |
Forum: C++ Apr 9th, 2008 |
| Replies: 3 Views: 508 result is set to 10 in the last iteration of the first for loop
and then you assign result (10) to every element of your 2-d array in the other for loops |
Forum: Java Apr 8th, 2008 |
| Replies: 4 Views: 486 so lets look at line 112:
truckinfo[i].Set(inputhp, inputmileage, inputyear);
The two references that you dereference in that line are "truckinfo" and "truckinfo[i]". "truckinfo" isn't null... |
Forum: C++ Apr 3rd, 2008 |
| Replies: 3 Views: 3,399 there are numeric_limits<float>::quiet_NaN() and numeric_limits<float>::signaling_NaN() |
Forum: C++ Mar 30th, 2008 |
| Replies: 2 Views: 764 http://en.wikipedia.org/wiki/%3F: |
Forum: Java Mar 20th, 2008 |
| Replies: 11 Views: 1,153 do you mean, "it doesn't compile"? there are no classes named Widget, Spork, or Grommet; how do you expect to create new objects of those classes? |
Forum: C++ Mar 18th, 2008 |
| Replies: 2 Views: 2,187 string is in the std namespace |
Forum: C++ Mar 17th, 2008 |
| Replies: 5 Views: 1,552 if you just used pointers
#ifndef LINE_H
#define LINE_H
class Point;
class Line
{
// Ax+By+C = 0 |
Forum: Java Mar 15th, 2008 |
| Replies: 8 Views: 935 yes. (except that in Java the first object is garbage-collected and in C++ it isn't) |
Forum: Java Mar 14th, 2008 |
| Replies: 8 Views: 935 you should read a basic guide to Java
Java consists only of primitive types and reference types (which are kind of like pointers in C). Reference types point to objects, and are named after the... |
Forum: Java Mar 12th, 2008 |
| Replies: 4 Views: 1,359 what exactly is your question?
why can't the classes be separate and you just put each class in its own file?
also the "main" method should be static |
Forum: Java Feb 23rd, 2008 |
| Replies: 4 Views: 1,178 what is "execution via a webpage"? |
Forum: Java Feb 10th, 2008 |
| Replies: 3 Views: 3,237 if "\" were the separator, you would do
str.split("\\\\")
the reason is that the argument to split() is compiled into a regular expression; and characters which are special in regex need to be... |
Forum: Java Feb 9th, 2008 |
| Replies: 5 Views: 4,291 Scanner.next() returns up to the next delimeter, which is a space by default
what do you expect it to do?
if you want to read the rest of the line, you can use the "nextLine()" method |
Forum: Java Jan 30th, 2008 |
| Replies: 6 Views: 3,159 attribute[] attr=new attribute[no_of_attribute];
attr has no_of_attribute arguments
for(int i=0;i<no_of_entity;i++){
i goes from 0 to no_of_entity
for(int j=0;j<no_of_attribute;j++){
j goes... |
Forum: Java Jan 13th, 2008 |
| Replies: 6 Views: 2,698 there are two lines of
Class.forName ("oracle.jdbc.driver.OracleDriver");
in your code |
Forum: Java Jan 12th, 2008 |
| Replies: 6 Views: 2,698 there are two lines where you call that method; you caught the exception for the second one, but not the first |
Forum: C++ Jan 6th, 2008 |
| Replies: 7 Views: 884 oh my god, you are allocating one character, and then you are setting that character to the character that has the ASCII value that is the length of some other string
look at it |
Forum: Java Jan 4th, 2008 |
| Replies: 17 Views: 2,440 No, those are local variables inside the method. They do not have access modifiers like "private". |
Forum: Windows NT / 2000 / XP Sep 22nd, 2007 |
| Replies: 35 Views: 43,326 Bushii...your advice works mate. Simple as ABC. Sceptic at 1st but hey presto..it works right after i restart my comp. Thanks a million mate. |
Forum: Windows Software Mar 31st, 2007 |
| Replies: 10 Views: 32,911 No, the DMR's method works. You just have to start command prompt cmd at START/RUN. Then you navigate in CMD to the folder where this crazy nasty file is, in this case the Office 10 folder. Once you... |