Search Results

Showing results 1 to 34 of 34
Search took 0.01 seconds.
Search: Posts Made By: bugmenot
Forum: C++ May 29th, 2008
Replies: 9
Views: 2,647
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
wow.

what did you expect that code to do?
Forum: C++ May 2nd, 2008
Replies: 4
Views: 569
Posted By bugmenot
except that it doesn't check bounds
Forum: C++ May 1st, 2008
Replies: 5
Views: 704
Posted By bugmenot
just download it from the sourceforge project
http://sourceforge.net/projects/dev-cpp/
Forum: C++ Apr 29th, 2008
Replies: 2
Views: 414
Posted By bugmenot
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
Posted By bugmenot
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
Solved: hcf and lcm
Views: 4,312
Posted By bugmenot
note that with any two numbers a and b, a * b = gcd(a, b) * lcm(a, b)
Forum: Java Apr 14th, 2008
Replies: 6
Solved: HashTables
Views: 761
Posted By bugmenot
can we see more code? for example, what types are all these things? how are they defined?
Forum: Java Apr 13th, 2008
Replies: 6
Solved: HashTables
Views: 761
Posted By bugmenot
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
Solved: Struct in C++
Views: 574
Posted By bugmenot
maybe you are using a C compiler instead of C++
Forum: Java Apr 11th, 2008
Replies: 3
Views: 1,172
Posted By bugmenot
um... where is your code?
Forum: C++ Apr 10th, 2008
Replies: 7
Views: 1,660
Posted By bugmenot
I think this will be possible in the next version of C++
Forum: C++ Apr 9th, 2008
Replies: 3
Solved: 2-D Arrays
Views: 508
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
there are numeric_limits<float>::quiet_NaN() and numeric_limits<float>::signaling_NaN()
Forum: C++ Mar 30th, 2008
Replies: 2
Views: 764
Posted By bugmenot
http://en.wikipedia.org/wiki/%3F:
Forum: Java Mar 20th, 2008
Replies: 11
Views: 1,153
Posted By bugmenot
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
Posted By bugmenot
string is in the std namespace
Forum: C++ Mar 17th, 2008
Replies: 5
Views: 1,552
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
what is "execution via a webpage"?
Forum: Java Feb 10th, 2008
Replies: 3
Views: 3,237
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
there are two lines of
Class.forName ("oracle.jdbc.driver.OracleDriver");
in your code
Forum: Java Jan 12th, 2008
Replies: 6
Views: 2,698
Posted By bugmenot
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
Solved: Templates help
Views: 884
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
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
Posted By bugmenot
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...
Showing results 1 to 34 of 34

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC