5,237 Posted Topics
Re: > what should i do exacly? My guess is that you should use a loop. | |
Re: [icode]orders array_of_orders[MAX_ORDERS];[/icode] Which you index with something like [code]array_of_orders[orderNumber].member = something; orderNumber++; [/code] Or for something more C++, [icode]std::vector< orders > vector_of_orders;[/icode] | |
Re: Great, you've got your free cookie, but have you learnt anything in the process? > I definitely never would have been able to do it on my own. Sure you would, eventually. But instead you're dazed by vijayan121 'brilliance' rather than building up your knowledge towards your own solution. Which … | |
Re: > I have gone through the image extracting information from the file allocation table So you have a list of filenames and directories then? It seems odd that you can figure the intricacies of the internal format of FAT, yet can't call an API function to create a few directories. … | |
Re: All of those things will not stop the determined (or the incompetent) from modifying the file. What's wrong with a nice simple text file, with a banner at the top which reads something like # This file is auto-generated. Any changes you make could be lost # or cause the … | |
Re: > Are all device drivers written in assembly language? No. There isn't a lot that can't be achieved with 'C'. A small amount of asm in the bootstrap is usually enough to establish a viable 'C' environment for a limited subset of 'C' at least. If specialised instructions are needed … | |
| |
Re: Does your stack fail if you try to pop more times than you push? Do you check for that in your code (no)? 5 5+ would seem to fail to push two values, you detect a space, and there isn't one 5 5 + might fare better. Consider initialising your … | |
Re: Of course posting actual code rather than just describing it would really help. | |
Re: > That mean I have to return two int values from the function. How can I do that? So how does your first post not achieve that? Or you could contrive an answer with [code] struct twoint { int a, int b }; twoint func ( ) { twoint ans … | |
Re: *sniff sniff* Yep, it's happened before - [url]http://www.daniweb.com/forums/thread101495.html[/url] > First, move the Invoice closing brace and the semicolon beyond the access function setInvoice() Exactly how much hand-holding do you need? This assignment has to contain the most detailed instructions I've seen in a long time. Read the words, press the … | |
Re: Well this is spiffy... [url]http://www.daniweb.com/forums/thread101815.html[/url] | |
Re: Any decent C++ book should explain inheritance to you. | |
Re: Exactly how you described it. The algorithm remains the same as if you were implementing it in say C. The only difference is that it takes many more keystrokes to do because the program will be longer to develop and test. | |
Re: > I would like to add two things, simple sockets and simple multi-threading So be damned to the portability to lesser machines which lack say a network connection? All because you can't be bothered to write your own simple reusable network class. Besides, in order to be "simple", it would … | |
Re: > pint area=(width*length); > pint perM=( (width+width) + (length+length) ); How about moving these lines to AFTER you have input the values. Expressions are evaluated at the point you write them. They're not some kind of "rule" continually updated when new information (say cin >> width) happens. | |
Re: > 8 Hours Ago | Add to evilseed187's Reputation | Flag Bad Post > Don't know where to start and it is due in six hours. <elvis> I'm all shook up. </elvis> [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] Try emailing yourself a message to last week to get your lazy ass in gear. We're not … | |
Re: [url]http://www.daniweb.com/forums/announcement125-2.html[/url] | |
Re: You have to change the signature of the compare function, to expect pointers to two character pointers, not pointers to two character arrays. | |
Re: > char* temp = new char(2); Don't you mean [ICODE]char* temp = new char[2];[/ICODE] Later, you'll need [ICODE]delete [] temp;[/ICODE] | |
Re: <monty> Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out. </python> [url]http://forums.devshed.com/c-programming-42/help-askisi-se-c-c-if-anybody-knows-something-496768.html[/url] [url]http://cboard.cprogramming.com/showthread.php?t=97072[/url] More broadcast buffoonery from some dolt who thinks a … | |
Re: > Is this program correct?? No. For a basketball scoreboard, don't you need things like - the amount of time played, or the time left. - the score for each team. - a means of updating the score for each team (press one of two buttons say). - other buttons … | |
Re: Create a small command (or batch) file, which reads as follows [code] @echo off set TMP=C:\temp start C:\Dev-Cpp\devcpp.exe [/code] Change paths to suit. Your default environment sets TMP and TEMP to point to a directory in your local settings. But you can reassign them to be whatever you want on … | |
Re: The first step would be to make sure you can just read the information in, then simply print it out again unmodified. Then add your attempt at sorting the data. Post what you tried, at the point you get stuck. | |
Re: Add a specific test to detect the double "||" in the file, and act accordingly? | |
Re: [url]http://en.wikipedia.org/wiki/Scheduling_%28computing%29[/url] Your chart should look a bit like this [code] P1 -- P2 -- P3 ------ P4 P5 [/code] The horizontal lines representing the time where a particular process is active. | |
Re: Also spammed here - [url]http://www.go4expert.com/forums/showthread.php?t=7892[/url] I guess you didn't read the rules here either did you. [url]http://www.daniweb.com/forums/announcement8-2.html[/url] Since you're totally lacking in any ability to ask a question, you'd better read this as well. [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Key points being: - show some effort. - don't just dump your assignment. - don't … | |
Re: Programmer's get xmas and halloween mixed up because dec 25 == oct 31 | |
Re: [url]http://en.wikipedia.org/wiki/Category:Digital_signal_processing[/url] | |
Re: I'm sure they can, but you seem to want the whole answer off the bat without any additional effort on your part. [url]http://www.daniweb.com/forums/announcement125-2.html[/url] We're here to help, not be a free surrogate for rentacoder.com. Which means you do some of the work, then ask a specific question about what's wrong … | |
Re: [URL="http://msdn2.microsoft.com/en-us/library/ms712879.aspx"]The PlaySound function plays a sound specified by the given file name, [COLOR="Red"]resource[/COLOR], or system event.[/URL] So yes, it can play a resource, which may be embedded in the program. From there you need to use (perhaps) the resource compiler to turn a file into a resource that can be … | |
Re: > I had started writing all the functions and everything There's a saying which reads "hours spent thinking about the design can save months of coding". This applies here. A prime example being why all your 'A' to 'E' objects and functions all look the same. There should only be … | |
Re: > The string i am sending is also not longer than 512 bytes. But what about it's length after formatting? Try something like [code] char temp_str[10000]; vsprintf(temp_str,arg,ap); if ( strlen(temp_str) >= 512 ) { fprintf(stderr, "I was wrong\n" ); } [/code] > Im using multiple threds , which calls this … | |
Re: Well if the same kind of memory problems are being exhibited as in the [URL="http://www.daniweb.com/forums/thread100058.html"]other thread[/URL], then I'd say the code still has problems. The fact that it crashes in some SQL code is mere coincidence. AFAIK, malloc_consolidate() is just an internal function to malloc which joins together adjacent free … | |
Re: Which prime number would you like to find? Have you tried looking down the back of the settee? I find stuff there all the time, but I don't recall as yet finding a prime. Some things have been pretty ripe though, but that's beside the point. The other place I … | |
Re: There should be a mandatory option on the ballot which reads something like this: "I assert my right to vote, but I cannot at this time support any of the candidates listed". Too often, the choices on the ballot are like being asked "choose how you want to die". At … | |
Re: # struct song { # struct dirent *file; My guess is that you've only copied the pointer to the directory entry of the file, which has obviously been re-used or gone out of scope by the time you get to print it. Allocate space for, and manually copy the filename … | |
Re: Those would be the ones I would have thought of as well. | |
Re: For all your interfacing to USB, visit [url]http://www.lvr.com/usb.htm[/url] | |
Re: > warning C4996: 'fopen' was declared deprecated Add [icode]#define _CRT_SECURE_NO_WARNINGS[/icode] to the start of your file. [url]http://msdn2.microsoft.com/en-us/library/8ef0s5kh(VS.80).aspx[/url] > error C2065: 'line' : undeclared identifier Well this should be obvious. Declare line to be a suitable variable to pass to fgets() | |
Re: Well can you manage to do it all in one file, before adding to the complication (slightly) by making it 3 files? Or are you perhaps thinking that ^ is "raise power", and wondering about some strange error messages in the code you have? | |
Re: So what are you stuck on? - reading input - evaluating the expression to a fixed number of terms - evaluating to as many terms as it takes. As the readme's at the top of the forum say, no free homework without effort. Show us where you're at, and we'll … | |
Re: Yes, it can handle numbers as large as you like, but you need a library to help you. Here's a "bignum" library. [url]http://gmplib.org/[/url] | |
Re: Littering your code with system() is little better than writing batch files. Plus every call to system() involves running at least one additional process, possibly more. Starting a process is expensive, so it's best avoided. And system() is very easy to subvert into doing something other than what you intended. | |
Re: The real question would be how you've implemented it. Post your code, and don't forget to read the various announcements on making code look really neat and tidy. | |
Re: > The problem I'm having is that when I use the function strstr() in a while loop, the console hangs Well you don't advance the pointer, so it always begins the search from the same point, always finds the same match, and so on on on on ..... [code] while … | |
Re: > total += stock; > total += stock; Why are you doing this twice? If you want to do stuff on the 4th quarter, then you need to loop over months 9 to 12 (not 12 + 9) | |
Re: It's a pity you didn't read the post dates either :icon_rolleyes: | |
Re: [url]http://www.daniweb.com/forums/announcement14-2.html[/url] |
The End.