1,358 Posted Topics
Re: If you know not to, why are you? You don't know how to use arrays, or you aren't allowed to use arrays? There is a big difference, and the answer drastically changes the required algorithm(s). Someone [B]might[/B] help you if you answer that, and take some time to think about … | |
Re: [QUOTE]Also it's to 'hack' a program called steam to change stuff with friends and name stuff. Anyway I would appreciate it[/QUOTE] We know what steam is I would be surprised if that's all it's for... I would [B]not[/B] be surprised if a mod closes this. | |
Re: [CODE]//************************************************************************************************* /* Global Variables */ //************************************************************************************************* const int NAMESIZE=25; const int FILENAME=51; const int MAXLISTSIZE=200; typedef char Name_t[NAMESIZE]; typedef char Filename_t[FILENAME]; typedef int ID_t; typedef double Bal_t; typedef fstream Infile_t; typedef fstream Outfile_t; typedef int Link_t; //naming conflict[/CODE] [CODE]struct LLEle_t { cAccount Account; LLEle_t * Link_t; //naming conflict };// end … | |
Re: Your declarations and definitions match, which is good. That's not your problem. I get the same error when I try to compile it, but the message flags line 64. If you have a look at line 64, you'll see that your are using the statement [iCODE]input_polar (magA,angA);[/iCODE]. The issue is … | |
Re: Ask your friend if he can set up an FTP for you. I suspect he may have already... | |
Re: [QUOTE=Nick Evan;1154805]First [URL="http://www.daniweb.com/forums/announcement8-2.html"]read this[/URL], then post your effort.[/QUOTE] :D Do you feel like a broken record? I think this it the third time I've seen this in less than 10 | |
Re: [URL="http://www.daniweb.com/forums/thread266465.html"]Then have a look at your classmate's thread.[/URL] I'm sure you'll get plenty of suggestions there. You may even be able to steal his code. Then your prof can fail you both. | |
Re: Use in-code documentation. Pay closer attention to what you are doing. Think before you type. Remember your program's structure. Take notes. Take your pick. | |
Re: [URL="http://www.daniweb.com/forums/announcement8-3.html"]Don't count on much help until you figure out how to use code tags.[/URL] | |
Re: It's an order of operations thing. The '*' dereference operator has very low priority compared to other operations. You need to use parentheses to explicitly control the order of operations. *pmovie.title accesses then dereferences the "title" element of the struct, which most likely is not a pointer and thus causes … | |
Re: If you know anything about sessions, try storing the current remaining time in the session. That will allow it to persist between pages. You will then have to check the value stored in the session to determine what you need to do next. | |
Re: [URL="http://www.lmgtfy.com/?q=PHP+Tutorials"]Quit spamming.[/URL] | |
Re: Does it occur after some other input? If so, there may be still be some lagging information in the input stream that it's grabbing. Try placing [icode]cin.ignore();[/icode] directly before it. | |
Re: Bit Fields give you direct access to the bits contained in data. I'm currently using a bit field as active/inactive flags for rules variations for a game. In general they are used as a compressed method of storing several true/false (bool) values. The bit field itself is the struct named … | |
Re: If a vector is 120 elements, you don't have to use all 120 elements of it. You can use any number of elements you wish as long as they have indexes in the range [0, 120). It's a waste of resources, but it's completely legal. | |
Re: Change the for-loop to a while loop, then figure out how to control and structure the loop properly. Even if this "loop"'s termination statement were written correctly, it doesn't do what you think. In general for-loops are for determinate situations, this is an indeterminate situation. Look up the difference in … | |
Re: C++ is very popular because of the object orientation. C is a subset of C++. C++ is a more-modern extension/expansion of C, you really should take the C++ course. NOTE: The course is likely to teach you the more modern methods. You will have to do some reading on C … | |
Re: It's probably disappearing before you can see the output. Add [icode]cin.get();[/icode] at line 45, that will hold it open until you press [ENTER]. I hope this is a work in progress, I don't see anything that would even come close to skipping the vowels. | |
Re: Does getCell() know that it is part of your mapInit class? Hint: No, it doesn't. | |
Re: Building a program is like building with blocks. Start small then assemble the small parts into the larger whole. Figure out how to do file reads/writes, then figure out how to compare values, then put the 2 together. | |
Re: [QUOTE=endframe;1152273]... Both (evan) and (odd) arays are in a structure (x) ; plus, I have made another structure (y) that is connected to (x) and has it same attributes. ...[/QUOTE] I think you need to understand what you have created first. What you call 'y' is an object/instance of the … | |
Re: Provide the code for the login and change password methods. You probably didn't handle the new password correctly in either your PHP or your SQL (or both). As a result, you didn't store the properly-encrypted version of it in your d-base. I suspect you'll find a hashing error in your … | |
Re: You'll have to take a look at your second loop and consider adding a second index (perhaps called 'j'). After that, take another look at how you are incrementing/decrementing your indexes. You will then want to look at how you are doing your comparison. If I'm reading your code correctly, … | |
Re: What are the names of the 3 groups that are misbehaving? It sounds like you probably did a copy/paste and forgot to change the name(s). | |
Re: You hard coded the array element to access. Change the array index referenced to some sort of variable. | |
Re: When an array has more than 1 dimension (call it n-dimensions), you must specify the sizes of dimensions 2 thru n when passing it to a function. You may only leave the first dimension undefined. I'm not sure how you would do that in your situation. An array is nothing … | |
Re: The random number generator has a specific starting value and follows a mathematical formula to generate the next number. If you know the starting value and the formula, you can predict the series that it will generate. That's just the way computerized random number generators are, some are better than … | |
Re: put a temporary page on your GoDaddy server with just this code: [code]<?php phpinfo(); ?>[/code] Navigate directly to it. The current value of the setting should appear in the "Configuration -> PHP Core" section of the output. Once you have the output, print it for your records then remove the … | |
Re: Look up srand() and rand(); After that, give it a little more thought and let us know what you come up with. | |
Re: I found it pretty easy. [URL="http://www.lmgtfy.com/?q=c%2B%2B+isnan+function"]Check this link.[/URL] | |
Re: You don't have any return statement after the recursive call. If you need a value back after the recursion terminates, you will need to store the recursion's return value then provide a subsequent return to get it out of the function. You could probably even use [ICODE]return GetRefundOrderNumber($oID,$try);[/ICODE] | |
Re: Quit spamming already. I'll give you the first 2, that was probably an accident, but the 3rd definitely was not. also take note: 1. This thread has been dead for 2-years. 2. You did the exact same thing. You just didn't pull in the std namespace explicitly. I hope you … | |
Re: [URL="http://www.cplusplus.com/doc/tutorial/pointers/"]Have you heard of pointers? (clicky)[/URL] You are trying to convert directly into a pointer. Because of what pointers are and how they work, you can not convert anything directly into a pointer. Take one '*' out of line 1 and eliminate the '*' from line 2. I think you're … | |
Re: Depending on the rest of the requirements for the assignment, it can actually be done more simply than that. I'm going to let the OP stew on it for a little while though. | |
Re: The way you have written your if condition, it will never become false. You have written it with OR statements. Only one of the statements must be true for the entire statement to be true. As a result, even if you enter a valid value, the other 3 check values … | |
Re: Looks like you have a decent algorithm there. [URL="http://www.daniweb.com/forums/announcement8-2.html"]Now try to translate it to code[/URL]. Shouldn't be too hard. Here's a good starting point: [code]int main() { }[/code] | |
Re: To create random numbers within a limited range you need to take the modulo (% operator) of the random number and the size of your range. You then need to add the minimum allowable value to the result. i.e. to produce numbers in the range [20, 45): [code] const int … | |
Re: If you haven't done any yet, I would suggest [URL="http://www.cplusplus.com/doc/tutorial/functions/"]some reading[/URL]. | |
Re: @OP: As johny mentioned, you are using weeklyearnings when you haven't placed any useful value in it yet. As a result, line 20: [icode]ttlsales = (.09 * weeklyearnings) + 200;[/icode] always generates (0.0 + 200). You need to correct your variable use. @johny_mplayer: Please [URL="http://www.daniweb.com/forums/thread78223.html"]read this[/URL]. It's okay to post … | |
Re: [URL="http://www.daniweb.com/forums/announcement8-2.html"]What have you done so far?[/URL] We can't help until we know what you've tried and where you are at. | |
Re: I would suggest changing all of your floating point variables and returns from float to double. There is a difference in how floats and doubles are handled in the system and there is a difference in precision. You may be getting some inaccuracies because of the mingling of the 2 … | |
Re: How about an example... To get an iterator for a vector of integers (named iVectorIt) you need to use [icode]vector<int>::iterator iVectorIt[/icode]. Take that and apply it to your list. | |
Re: "stdafx.h" is a header that VC++ automatically creates for every program created using one of the templates/wizards. You can safely leave it out of your program completely. It has nothing of any value in it unless you add to it. | |
Re: Without knowing exactly how your class works, it's hard to say. However, a good rule of thumb: If you use the "new" keyword in the class' constructor, you will need to use the "delete" keyword in the matching destructor. [edit] Looks like AD beat me to it. | |
Re: [QUOTE=Aser10;1145056]hi what is the difference between : [CODE]main(){}[/CODE][/quote] [COLOR="Red"]This version uses an [B]IMPLIED[/B] int return value. It is NOT standard and should never be used.[/COLOR] [QUOTE=Aser10;1145056] [CODE]void main(){}[/CODE][/quote] [COLOR="Red"]This version declares no return value. It is NOT standard and should never be used.[/COLOR] [QUOTE=Aser10;1145056] [CODE]int main(){}[/CODE][/quote] [B][COLOR="Green"]This version uses an … | |
Re: AD Covered the input issue you mentioned. Your "set..." functions are not written correctly, that's probably why you're confused. "set..." functions are supposed to be used to modify an object's attributes/properties by storing new information to the variables in your class. The issue with the design of your "set..." functions … | |
![]() | Re: [CODE=html]<select name="man_id" class="input" id="man_id">[/CODE] You don't have any triggers. You need to use events to trigger JavaScript to initiate an AJAX routine. Change it to something like: [CODE=html]<select name="man_id" class="input" id="man_id" onchange="JSFunctionName(this.value)">[/CODE] Where JSFunctionName() is the name of a JavaScript function intended to respond to the event. The "this.value" is … ![]() |
Re: Did you even read that link you posted? It doesn't [B][U]have to[/U][/B] be a struct, but you can use one that has a bool function in it. All you really need is a function that returns true when the items being compared are in proper order. |
The End.