1,372 Posted Topics
Re: basically a function looks like this: [code=cplusplus]return_type function_name (type variable, type variable) { return return_type; }[/code] So, let's do the first one, sum. What does it need to return? I'd say an int (though a double is probably needed) So look at the return value... it needs to return an … | |
Re: [QUOTE=michinobu_zoned;771579]I disagree. I use Linux and do nothing to contribute to its kernel....[/QUOTE] Well If you really want to get technical, Linux /IS/ the kernel, and ONLY the kernel. The truth is, the operating system name is GNU (Recursive Acronym that means GNU is NOT UNIX), and "Linux" is the … | |
Re: I'm not sure how using session to store the invalid attempt count works, but it's sounding like a DoS waiting to happen. What if I (not legit user) want to stop you (legit user) from accessing your account? I guess I could try three times to get your password (and … | |
Re: Ok.... I'm not sure exactly what it's going to entail.... do you have the buttons already added for the scientific portion? Attach your project to the next post, and we'll go from there. | |
Re: Hmmm, I'm going to guess (since you didn't mention what the problem was) that it's skipping to the bottom of everything after you input the letter. Yeah. The problem is that you are doing a cin >> type double (yeah, LetterGrade_1 is a double, not a char) so when you … | |
Re: You could do it with IPTables.... just set the rule to not allow outgoing traffic to a given site. Set it up with a script in a cron job, to handle what to block and when.. | |
Re: Sounds like a fun homework assignment..... what code do you have so far? | |
Re: How is the linker supposed to know about the object/variables? | |
Re: [inlinecode]memset (b, '0', 100);[/inlinecode]? | |
Re: You can do the same with classes. In C++ a struct [b]is[/b] a class. The only difference is that a struct's data members are public by default... while a class's are private by default. | |
Re: hmmm, trying moving .MoveNext to the outside of the loop. | |
Re: I'm not going to say that shell script [b]can't[/b]... but I will say it's probably not a great idea. I mean, assuming the proper rights, you might be able to use simple output redirection to sends the contents of the song directly to the output device. This depends on a … | |
Re: Looks to me like you are mixing a couple concepts. For starters, you have at the top, your function prototypes... those say that getStudentCount is returning no value to the main function. However, when you actually code the function, you say that it is returning an int. Now, in the … | |
Re: when you say "the remaining contents should be the same" do you mean, in file1 (ALL:FILE1) it should have just ALL:FILE1, AND the rest of the file (with the exception of ALL:FILE2, and ALL:FILE3, etc) or .... what? | |
Re: // is a comment, not \\, but even so, if it were in quotes it wouldn't matter. This is ok: [code=cplusplus]std::string x = "//hello world";[/code] | |
Re: if you know the caption / title of the window you can try this: [inlinecode]appactivate "title of window here"[/inlinecode] | |
Re: What you need is the API call (assuming windows here... *nix let's you do it without some kind of voodoo) MoveFileEx. MoveFileEx is an api called (I believe declared in windows.h) that allows you to move a file, even if the file is in use. This doesn't actually take effect … | |
Re: I'm assuming that by "downloaded and installed" you mean that the web-server installs the files/applications to the client/local computer. If that is case, then no. This never happens. A Web-server is a program that runs on a server.... what it is [b]not[/b]... is HTML, javascript, ActiveX, or any of the … | |
Re: usually you don't. Unless you can download the appropriate cab-files from a *beeeeeeeep* site or a *beeeeeeeeep* that has it on his or her computer. | |
Re: if it's a normal text file, I would cut it by the lines. Count how many lines there are, divide it by 4, and write them into new files. I'd probably add a byte or a line to the end of the file as the tag. The only thing I … | |
Re: You are passing no parameters to the Point class's constructor. It expect 3 floats, during instantiation (Point myLocation). You need to give it three floats. | |
Re: that depends entirely on how the data is stored in the flat file... the problem with flatfiles, is that they are sequential. So, at the very least, you are going to have to loop through the lines in the file, until you find your record, remove your record, and re-write … | |
Re: you are using "new" right? So, it's dynamically allocating memory right? Where is your pointer to the new object in memory? [code=cplusplus]int main() { X *newX = new X(); }[/code] EDIT: *Snaps His Fingers* Beat me to it! | |
Re: can you put the code on the tab's mousedown event? | |
Re: Even though I strongly empathize with your situation, the code that you are requesting is highly illegal, and has major moral implications as well. As the site rules (sometimes unfortunately) dictate, this type of help (even though the situation may warrant it) is forbidden on the site. I'm sorry. | |
Re: I strongly suggest using [url=http://www.libsdl.org/projects/SDL_net/]sdl_net[/url] for your socket work. I've found it to be a very nice cross-platform socket library, with quite a bit of functionality. It has a couple of quirks, but they are minor, and easy to work around. As A.D. Suggested you would need to connect to … | |
Re: Show me the code you have, and I can see what help I can offer once I see what effort you have applied. Step 1. Read argv[0]. argv[0] is the name of the file Step 2. Check that argv[0] file still exists (yeah, it should) step 3. Open the file … | |
Re: What code do you have so far? Post your effort, and we may help. | |
Re: [code=cplusplus]#include <iostream> using namespace std; int kids = 0; int pass = 0; int score = 0; int main(int argc, char **argv) { cout << "Enter number of students: "; cin >> kids; for (int count = 1; count <= kids; count++) { cout << "What was student " << … | |
Re: What code do you have done so far? EDIT: if your answer is none... start here: [code=cplusplus]#include <iostream> using namespace std; int main(int argc, char **argv) { // Declare Length, width, area and perimeter // Display message about length to user // Get length from user // Display message about … | |
Re: *Mumbles something about multiple exit points* | |
Re: How about you not post to 4 year old threads... dolt. | |
Re: How about you do your own homework? | |
Re: [QUOTE=cguan_77;789603]...if you want to do it in vb check out System.Diagnostics.Process[/QUOTE] Sure, If you are using .NET.... not gonna work in vb 4/5/6. I can get you the code to kill a process from within VB6, but figuring out how to know if it's the one you want to kill … | |
Re: how is doing that in a timer going to work? The math behind converting the times is simple.... subtract 12, and make it PM if the number is greater than 12... | |
Re: Probably is, you've pointed to VB.NET, this is vb 4/5/6 | |
Re: Other than you have two mains ;) you need to change the [ ] around the return value of strtok to ( )... don't count on it showing you anything though.... (you have no data output) | |
Re: [url]http://www.clarku.edu/~djoyce/trig/right.html[/url] | |
Re: why is 'a' a pointer to a pointer? edit: Hmmm...I see what's you're trying to do. | |
Re: Implicit cast to long long int seems to work....(at least on Fedora 8 with g++) edit: forgot about precision... discard. (you may need to use GMP, if in linux) | |
Re: How 'bout you figure it out and check the [url=http://www.daniweb.com/code/snippet35.html]code snippets[/url] section? | |
Re: [url]http://www.daniweb.com/forums/thread16201.html[/url] | |
Re: Put this in your form or module: [code=vb]Public Function Check_Key(Key As String) As Boolean Dim wsh Set wsh = CreateObject("WScript.Shell") On Error GoTo nokey ' I rarely, If ever use GoTo... I hate sloppy code ' however, this seems to warrant its use... so be it. keyval = wsh.regread(Key) If … | |
Re: It is too late.... this thread is like, 2 years old man, and the OP said he got it working..... | |
Re: First off all, how about you not post to really old threads.... secondly, how about you don't post the same thing twice... | |
Re: Yes... but it will require a noxious amount of API calls with GDI. I suppose a great start would be researching GetDC() api call, and then working on learning BitBlt. You could probably get the device context of your picturebox, then use bitblt to get only a certain area of … | |
Re: That's because bash tells the computer to spawn a [B]new instance[/B] of bash. So, the script makes a new copy of bash, changes into the desired directory, and then discards the new shell (bash). Once it discards the new shell, you are back at the old shell, which is in … |
The End.