1,372 Posted Topics

Member Avatar for JDsmith

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 …

Member Avatar for JDsmith
0
117
Member Avatar for tech291083

[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 …

Member Avatar for Toba
0
149
Member Avatar for deepika_m

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 …

Member Avatar for Comatose
0
100
Member Avatar for PolarClaw

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.

Member Avatar for jenmedina
0
143
Member Avatar for tpetsovi

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 …

Member Avatar for Comatose
1
128
Member Avatar for rhesus303

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..

Member Avatar for Comatose
0
133
Member Avatar for scott_s58

Sounds like a fun homework assignment..... what code do you have so far?

Member Avatar for Comatose
0
161
Member Avatar for VBNick
Member Avatar for VBNick
0
298
Member Avatar for nijju_31
Member Avatar for shahab.burki

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.

Member Avatar for Comatose
0
79
Member Avatar for ryan311
Member Avatar for progurammaar

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 …

Member Avatar for progurammaar
0
102
Member Avatar for Himerz

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 …

Member Avatar for Himerz
0
108
Member Avatar for pharitha

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?

Member Avatar for mitchems
0
152
Member Avatar for cassie_sanford

// 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]

Member Avatar for Comatose
0
163
Member Avatar for Rombosia

if you know the caption / title of the window you can try this: [inlinecode]appactivate "title of window here"[/inlinecode]

Member Avatar for Rombosia
0
113
Member Avatar for UGndLord
Member Avatar for kristjan84

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 …

Member Avatar for Comatose
0
82
Member Avatar for Bob Jacobs

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 …

Member Avatar for Comatose
0
111
Member Avatar for asameh99

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.

Member Avatar for Comatose
0
64
Member Avatar for DJPlayer

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 …

Member Avatar for DJPlayer
0
118
Member Avatar for En-Motion

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.

Member Avatar for En-Motion
0
1K
Member Avatar for parkes92

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 …

Member Avatar for hkdani
0
147
Member Avatar for zgulser

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!

Member Avatar for Ancient Dragon
0
122
Member Avatar for amarsha4
Member Avatar for voider72

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.

Member Avatar for Ancient Dragon
0
88
Member Avatar for amerninja2

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 …

Member Avatar for amerninja2
0
1K
Member Avatar for bubun1979

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 …

Member Avatar for ArkM
0
200
Member Avatar for xR3born
Member Avatar for Comatose
0
145
Member Avatar for Happie Juice

[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 " << …

Member Avatar for Nick Evan
0
100
Member Avatar for lerkei
Member Avatar for southernd0529

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 …

Member Avatar for Comatose
0
152
Member Avatar for jraven1
Member Avatar for nubs
Member Avatar for Comatose
0
160
Member Avatar for nspnayani
Member Avatar for karthiknv

[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 …

Member Avatar for SCBWV
0
277
Member Avatar for ryan311

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...

Member Avatar for SCBWV
0
90
Member Avatar for wookinhung
Member Avatar for number87

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)

Member Avatar for death_oclock
0
127
Member Avatar for Jigs_ff
Member Avatar for drjay1627
Member Avatar for StuXYZ
0
113
Member Avatar for winrawr

why is 'a' a pointer to a pointer? edit: Hmmm...I see what's you're trying to do.

Member Avatar for Freaky_Chris
0
132
Member Avatar for xtremerocker

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)

Member Avatar for xtremerocker
0
215
Member Avatar for vijaykumarsajja

How 'bout you figure it out and check the [url=http://www.daniweb.com/code/snippet35.html]code snippets[/url] section?

Member Avatar for Comatose
0
47
Member Avatar for winrawr
Member Avatar for winrawr
0
105
Member Avatar for devstudio.2007

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 …

Member Avatar for Comatose
0
146
Member Avatar for reaven

It is too late.... this thread is like, 2 years old man, and the OP said he got it working.....

Member Avatar for Comatose
0
249
Member Avatar for pjacquez68

First off all, how about you not post to really old threads.... secondly, how about you don't post the same thing twice...

Member Avatar for samir_ibrahim
0
109
Member Avatar for Rombosia

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 …

Member Avatar for Rombosia
0
1K
Member Avatar for eapln

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 …

Member Avatar for eapln
0
113

The End.