15,300 Posted Topics

Member Avatar for Robin_Dragon

[QUOTE=Robin_Dragon;447612]I found the solution to question i asked previously. But could someone please explain line by line what each line is doing. Thanx... [/QUOTE] Why? So that you can plagiarize someone else's code and turn it in as your own work? Why don't you add your own comments to work …

Member Avatar for Narue
0
2K
Member Avatar for nquaoser

>>why do we need that To complete the while statement. Normally putting a semicolon there would be a bug, but not in this case because there is nothing else to do. >>It's too compact to be readable. Then the reader doesn't know C language very well, probably a newbe. Looks …

Member Avatar for n.aggel
0
338
Member Avatar for mooseguy

>>To do this, I somehow need to turn the int into a char of THAT INT, not the ascii character for that value. Do you mean if you have an int with the value 15 then you want a string "15" so that you can display it in an edit …

Member Avatar for Aia
0
83
Member Avatar for furpacino

I see its now been 8 days since you originally made this thread and thankfully still have surviced (not killed yourself) :) I assume that was just an exaggeration -- would you like me to change the title of this thread ?

Member Avatar for Ancient Dragon
0
159
Member Avatar for anga08628

>>User will enter first name followed by one or more spaces and then the last name You can not do that with [inlinecode]cin >> fullname;[/inlinecode] because cin will stop reading from the keyboard at the first space, which is not what you want. User getline() to change that behavior, like …

Member Avatar for Ancient Dragon
0
167
Member Avatar for use4d
Member Avatar for The Dude

That's exactly why drivers should not eat while driving. At his age he needs to give up that crap anyway to avoid getting completly clogged artires and heart attack.

Member Avatar for efmesch
0
101
Member Avatar for Narue

The second problem I've seen occasionally too. Never attempted to mark forums as read so never experienced the first problem.

Member Avatar for Michele_Verona
0
250
Member Avatar for pdwivedi
Member Avatar for mylesnezri

see [URL="http://msdn2.microsoft.com/en-us/library/ms686722.aspx"]this[/URL] There is no really good way to do it without some very serious side effects.

Member Avatar for Ancient Dragon
0
21
Member Avatar for m_meena
Member Avatar for Ancient Dragon
0
98
Member Avatar for laoballer

>>Provide for the "worst case in which all 20 numbers are different >>Use the smallest possible array to solve this problem. The answer is an array of 20. please post your pseudo code that you have written so far.

Member Avatar for Narue
0
120
Member Avatar for someguy88

It generates the same set of numbers every time because you didn't seed it. Do this: [code] #include <ctime> int main() { srand( time(0) ); // see the random number generator // other code here } [/code]

Member Avatar for Narue
1
98
Member Avatar for imonriddilin

you need to use an os-specific function to delay the program a bit inside the loop. If you are using MS-Windows you can include windows.h and call [b]Sleep[/b] function. >>cout<<"\010."<<flush; Thats poorly written. flush is not normally needed. Below is normally how to move the cursor back to the beginning …

Member Avatar for n.aggel
0
130
Member Avatar for Darrace

[QUOTE=Darrace;446701]wanna learn just cause it seems fun[/QUOTE] Its also illegal, so I'm closing this thread.

Member Avatar for Ancient Dragon
-2
60
Member Avatar for cbgreene9185

Every character you can type on the keyboard is entered into your program as an int. The [b]char[/b] data type is really a one-byte integer. There is no such thing in C and C++ as a [b]character[/b] data type. So if the '@' character is causing your program problems then …

Member Avatar for Ancient Dragon
0
94
Member Avatar for ampdoc
Member Avatar for Ancient Dragon
-1
128
Member Avatar for curt22

Would you please also post [b]resource.h[/b] so that I can compile it ?

Member Avatar for Ancient Dragon
0
142
Member Avatar for louise07

what compiler are [b]we[/b] using ? And why are [b]we[/b] mixing C functions with c++ code? If you are going to write are c++ program then do so. Yea I know c++ language supports those c functions but its a lot better style to use all c++.

Member Avatar for louise07
0
117
Member Avatar for twomers

Is is really all that hard to go 130 mph when riding down a mountain sloap; now do that riding UP hill and that would be a grand achievement. ? Certainly Mr. Stoeckl diserves all the glory and attention for doing it, but I would think it could be somewhat …

Member Avatar for jasimp
0
132
Member Avatar for curt22

First, don't allocate the buffers like that. Its just toooo much! If you want to use dynamic allocation then allocate them before the loop and delete them after the loop terminates. >>But I don't know how to move to the next item Increment the second parameter ??

Member Avatar for curt22
0
125
Member Avatar for Cyone

I bought an Acer a few years ago from Best Buy because it seemed to be a good idea at the time -- no screws that is. After I got it home, opened the case to add another card, I had a terrible time trying to get it put back …

Member Avatar for Lardmeister
0
208
Member Avatar for hbk619

ouch!!!! my butt hurts just looking at that. That sport looks like alot of fun, but ....

Member Avatar for Lardmeister
0
62
Member Avatar for Necrolis

why don't you replace the ifstream and ofstream objects with just one fstream object then open it for both input and output, in binary mode.

Member Avatar for Ancient Dragon
0
89
Member Avatar for geeman028
Member Avatar for dblbac
Member Avatar for dblbac
0
184
Member Avatar for robotnixon

This is a typical binary search algorithm. Before doing anything initialize the value of max to be 100 (because that's what you said would be the maximum possible value) and min to be 1 (for the same reason). You should delete lines 36 and 46 because those two are initialized …

Member Avatar for robotnixon
0
110
Member Avatar for tnvkrishna

The [b]flush[/b] function forces data to be written to a disk data file (or some other output stream). There is a couple ways I can think of to solve your problem: 1. write each value to a file then read the values back and display them when the user is …

Member Avatar for vijayan121
0
115
Member Avatar for complete

>>I remember that the path a compiler uses to find a header file is determined by the "Path" that you see when you type "path" on the command line. Might depend on the compiler, but normally it looks in either the PATH environment variable or the path in the [b]-I[/b] …

Member Avatar for Ancient Dragon
0
74
Member Avatar for indygirl

>>When the money is added it gets added to the begBal not the current balance In ProcessDeposit() why not simply add the transaction amount to the current balance? Change line 15 to this: [inlinecode]currentBal += transAmt;[/inlinecode]

Member Avatar for Ancient Dragon
0
113
Member Avatar for step2stepgirl

>>and i have a problem in writing the main If you really wrote the code you posted writing main() should be a breaze. So what is it about main() you can't (or won't) do ?

Member Avatar for step2stepgirl
0
217
Member Avatar for dynarial

[URL="http://www.google.com/search?hl=en&q=technical+colleges+in+california&btnG=Google+Search"]google[/URL] is a good place to start. Visit each college listed and see if they offer what you want. If you find some then visit them in person and talk to conselers. As long as they are accredited they should be ok.

Member Avatar for darkagn
0
109
Member Avatar for shruthi.j

do you know how to code bubble sort? or any other sorting algorithm ? If yes, then sorting structures is nearly the same thing except instead of swapping integers you swap whole structures. But it runs a lot faster if you use an array of pointers to structures instead of …

Member Avatar for Ancient Dragon
0
108
Member Avatar for gator6688

post the rest of that function becase what you posted is not enough to tell us anything about the problem you have.

Member Avatar for WaltP
-1
112
Member Avatar for mstrmnd2008

Minutes is calculated like this (I think). You have to subtract from original value of secs the number of seconds in hrs variable then mod the result with 60 (60 seconds in one minute). [code] secs -= (hours * sph); minutes = secs % 60; [/code] Now the remaining seconds …

Member Avatar for vmanes
0
115
Member Avatar for jrice528
Member Avatar for Ancient Dragon
0
46
Member Avatar for mattb_25

>>I just don't know how to find the sum of the numbers between 1 and the number they entered How would you do it yourself with pencil & paper? If I enter 5 then you want 1+2+3+4+5. Now do the same thing with a loop and two counters -- one …

Member Avatar for Ancient Dragon
0
108
Member Avatar for sarahger9

show us the code you have written so far. Do you know how to use [b]vector[/b] class? That is the easiest array to use. You can make a [b]vector[/b] of [b]string[/b] objects [code] std::vector<std::string> theArray; [/code]

Member Avatar for Ancient Dragon
0
133
Member Avatar for thundaga

you must have changed something. post new code where the problem is.

Member Avatar for Ancient Dragon
0
132
Member Avatar for alsoumhi

>>but I don't know where is the wrong? What does it not do correctly? I see a couple problems with line 17: 1. What happens if you enter a value for either [b]x[/b] or [b]y[/b] that are outside the range of the array? For instance, enter a value of 50000 …

Member Avatar for Ancient Dragon
0
106
Member Avatar for eranga262154

[URL="http://www.winprog.org/tutorial/"]Tutorial[/URL] [URL="http://www.daniweb.com/forums/thread70096.html"]Books[/URL]

Member Avatar for n.aggel
0
172
Member Avatar for gattispilot

You can't reliably test for equality of floats due the the way they are represented in memory. May floats can't be represented exactly. So you can't reliably use the == operator. You might try something like this: [code] if( (newdeck > .449) && (newdeck <= .450) { // blabla } …

Member Avatar for Ancient Dragon
0
88
Member Avatar for driplet

>> run(v1, v2, v3, v4); you are attempting to pass the variables by values instead of by reference (pointer). Put an ampersand & in front of each variable to make them pointers like this [inlinecode] run(&v1, &v2, &v3, &v4);[/inlinecode]

Member Avatar for Salem
0
292
Member Avatar for ubercat

>>I posted the following in the stickied book thread as it seemed the most appropriate place for it. That was 2 days ago and no one responded so I probably guessed wrong Yes you were wrong to post it there so I deleted it just now because of this thread. …

Member Avatar for kako13
0
113
Member Avatar for jaepi

most win32 api functions have two versions -- one for char* and another for wchar_t*. If you are looking at a function that uses TCHAR* then you can just safely assume char* when not compiled for UNICODE.

Member Avatar for jaepi
0
985
Member Avatar for loimarie

depends on the assembler, operating system and hardware in the target computer. If you are using a PC do you want the sound to come out of the sound card & speakers or out of the hardware sound speaker ? I have not attempted to do that but those are …

Member Avatar for loimarie
0
91
Member Avatar for driplet

>>Could any body else tell me what I should revise if I want to use pointers or reference for input? Nothing. Its already coded by reference because its not possible to pass an array any other way (pointers and references are essentially the same thing, although there are a couple …

Member Avatar for driplet
0
153
Member Avatar for muhammad amir
Member Avatar for sbakca

actually that isn't even compileable C function. It needs braces around lines 3-6. And the loop starting at line 10 has several problems -- one of them is probably infinite loop at line 12 because the value of j may never get incremented. It is also a horribly written function. …

Member Avatar for Ancient Dragon
0
460
Member Avatar for SheSaidImaPregy

Opening a database is expensive in terms of both time and resources. So the fewer times you have to open it the better performace your program will achieve. I would opt for option #2. Of course one problem is that you may need to tell the database server to flush …

Member Avatar for SheSaidImaPregy
0
802

The End.