190 Posted Topics
Re: [QUOTE=cobberas;581324][code] Candies[0] = {"Violent Crumple", 20.5, 7000}; [/CODE] which I know doesn't work (syntax error) - but why not??[/QUOTE] I think this will be possible in the next version of C++ | |
Re: how did you decide this is the case? and how big is your "int"? | |
Re: Wow that's a badly named function. "increment" doesn't mean "return the thing that's one bigger" (that would be called "successor" or something like that). "increment" usually means "take this variable and change it so that it is one bigger". | |
Re: so lets look at line 112: [code]truckinfo[i].Set(inputhp, inputmileage, inputyear);[/code] The two references that you dereference in that line are "truckinfo" and "truckinfo[i]". "truckinfo" isn't null because you initialized it to a new array before the loop. As for "truckinfo[i]", no elements of the array have ever been set to anything … | |
Re: but that doesn't insert it in the right place | |
Re: allocate it dynamically from the heap, which is usually much larger | |
Re: inner classes are nice because they can implicitly access the fields of the enclosing instance, so if your buttons were pointed to by a field, then you can use an inner class to access them | |
Re: it doesn't print any errors for me one of the problems that you have of course is that you only have one "arrtibute" object in the entire program; so the values of the map all point to the same object | |
Re: there are numeric_limits<float>::quiet_NaN() and numeric_limits<float>::signaling_NaN() | |
Re: yes, although it will be copied, which might be slow what doesn't work? post your code | |
Re: so wordlist::wordcount is a function. you are trying to get a field of it? | |
Re: [url]http://en.wikipedia.org/wiki/%3F:[/url] | |
Re: it appears to be an applet. you usually have to embed the applet in an HTML page using applet tags and use a browser to run it | |
Re: call the constructor explicitly to create a new temporary object [code]problems.push_back(problem(person, value, assistant));[/code] | |
Re: "cin >> Y" parses a boolean (which i think just parses a number); not a "Y"; are you confused because you have a variable named "Y"? | |
Re: [quote=greeneyedlady;371039]My XP is missing the dvd decoder for WMP. Is there a free one out there?[/quote] Media Player Classic has its own DVD decoder: [url]http://www.free-codecs.com/download/Media_Player_Classic.htm[/url] The K-Lite codec pack has a bunch of DVD decoders to choose from: [url]http://www.free-codecs.com/download/K_Lite_Codec_Pack.htm[/url] | |
Re: next time why don't you tell us why you think it's wrong first how is "position" used in your method? you seem to just iterate to the end | |
Re: 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? | |
Re: the order that operands are executed is not really defined, so you should really not have operations that have side effects and operations that are affected by those side effects in the same expression you have the code [CODE](cout << a.f()) << a.f();[/CODE] in this particular case, they evaluated the … | |
Re: you cannot dereference a void pointer (what would you get? a void?) what are you trying to accomplish anyway? | |
Re: if you just used pointers [code] #ifndef LINE_H #define LINE_H class Point; class Line { // Ax+By+C = 0 double A,B,C; Point *p1, *p2; public: Line(); Line(Point *P1, Point *P2); ~Line() {} double getA() { return A;} double getB() { return B;} double getC() { return C;} Point *getP1() {return … | |
| |
Re: 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 class of objects they point to. Objects are not values in Java; and are always … | |
hi, i need help please... i need to write a program to calculate the depreciation of equipment passed its useful life using two different methods... these are the actual requirements for the program: "Depreciation" Program requirements: 1) write a c++ program to calculate depreciation using the straight-line and sum-of-digits methods. … | |
Re: 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 | |
Re: "b" and "c" are references (like the previous poster said, kind of like pointers in C) which may point to objects. objects are not values in java; instead, you always manipulate them through references. you have one reference pointing to one object and another reference pointing to another object; then … | |
Re: your master class must explicitly initialize the person class, i think | |
Re: it's self-explanatory "searchaddress" is a [B][I][U]character[/U][/I][/B], not a string | |
Re: right; in fact, every instantiation of the templated may have a separate copy | |
Re: um... you have random code outside of a method, in the declaration of class "carinfo" | |
Re: instance methods take an extra argument, the pointer to the instance that they are invoked on (the "this" pointer). so i have no idea how you think you are going to try to call an instance method without an instance | |
Re: your constructor is probably wrong | |
Re: if you really want to know, the members of an array are specified in [URL="http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.7"]JLS 10.7[/URL] | |
Re: [QUOTE=Sturm;511257]Enable JavaScript, problem solved.[/QUOTE] Wow, thanks for the pointing out the obvious but that's not the problem. Javascript is enabled, was never disabled, and yet Rapidshare still insists that Javascript be turned on. What's your solution for that? | |
Re: it's really hard to tell what you are doing without seeing some code in your "tree", do the nodes have references to their children; if so, then the children are not garbage collected, because they are reachable what you describe about going into the leaves and returning back up, is … | |
Re: your remove() method doesn't have a closing brace perhaps this has to do with your two opening braces after the if | |
Re: your add(), subtract(), multiply(), and divide() methods modify their arguments, without changing them back; i am not sure if this is what you want i don't understand your reduce() method. it creates three new fractions (initialized to 0/0), then tests the denominators of two of them (which of course are … | |
hi guys, i am using vb6 as front end and oracle as back end for my project. i am using ADO to connect to oracle database. can u please help me with the code. my code is [B]Dim con As New ADODB.Connection Dim str As String Private Sub Command1_Click() str … | |
Re: [url]http://en.wikipedia.org/wiki/Self-balancing_binary_search_tree[/url] [url]http://en.wikipedia.org/wiki/Red-black_tree[/url] | |
| |
Re: one reason why you might want to & 0xFF is that byte's are signed, so if "data" is a byte array, and some of the bytes are 128 or above, then they will be interpreted as being negative. and when they are promoted to integers or longs, they will still … | |
Re: Hi Just point your browser to wwww.gotocode.com | |
Re: there are several problems with this first, this is not how you write an equals() method; it needs to take an argument of type Object, in order to override the default equals() method second, you really don't want to have your class compare equal to strings, because it violates the … |
The End.