5,237 Posted Topics
Re: Why? I mean, if it's your homework, what would the point being of handing in someone elses solution? Read the forum rules, we don't hand out free homework unless you show some effort up front. | |
Re: Create a variable called say 'highestSoFar' Compare with each element of the array, and update it if you find a bigger value. | |
Re: Knowing how to program is far more important than being able to write a for loop in 20 different languages. Being able to construct a meaningful program in any language counts. Writing "hello world" or a bunch of typical homework assignments in many languages doesn't. | |
Re: Asked and answered already - [url]http://www.daniweb.com/forums/thread135693.html[/url] If you're not going to contribute, don't bother. | |
![]() | Re: Sure, just use the "add with carry" instruction, and you can add as many as you like. |
Re: Try putting the filename variable in quotes in other places as well. | |
Re: You also need to add the .cpp file to your project, which implements those functions (in the header file). | |
Re: > But if don't want an array why the compiler chooses to pad the end? How is the compiler supposed to know you don't want an array of them? > why "pay" 24bytes when we can fit the whole composite struct in 20 and at the > same time respect … | |
Re: Maybe read about code tags. There's plenty of places where they get mentioned before you get to posting, try reading some of them. | |
Re: Whitespace makes no difference to run-time performance. Neither do comments. | |
Re: That would seem to be the way to go. FILE*'s are constructed by the C runtime library, which may necessitate you dragging in a whole lot of stuff you didn't want. If you did want it, there would seem to be little point in writing this bit in ASM. | |
Re: > I thought I typed wrong here. What!!??? You mean that code isn't a direct copy/paste from your code editor? Because if it isn't, you're wasting everyone's time. > char* url = rtspServer->rtspURL(sms); Post that method. Are you sure that delete [] url; is valid at that point? > char* … | |
Re: Read the man page for select, and concentrate on what the first parameter should be. | |
Re: It leaks like a sieve. > delete namestr, surnamestr, addressstr; First of all, since you used [ ] in the new, you MUST use [ ] in the delete. Second, the comma operator doesn't mean "do this to all these things", it means "do it to the last thing". So … | |
Re: Write them to a file. And 10000000000 may be larger than an int on your machine (it's larger than an int on mine). | |
Re: > index_s1 = strlen(num_s1); What's here? - the last char of the string - or the \0 | |
Re: We just ignore people who bump their posts with pithy one-liners like "hello" or "is anyone here". [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] If you want instant feedback, join a chat room. Yes, there are other problems, but I don't feel like saying anymore just now. | |
Re: Scope perhaps? [code] if( TTF_Init() < 0 ) { return 1; } { Font thing; } TTF_Quit(); [/code] Or call another function. [code] void foo ( ) { Font thing; } int main ( ) { if( TTF_Init() < 0 ) { return 1; } foo(); TTF_Quit(); } [/code] Basically, … | |
Re: Perhaps [ICODE]if [ "$1" == "" ];[/ICODE] | |
Re: [url]http://sources.redhat.com/gdb/current/onlinedocs/gdb_21.html#SEC233[/url] I'm surprised you need to do this yourself. I would expect 'load filename' in GDB to be able to do it. | |
Re: [url]http://www.nist.gov/dads/HTML/avltree.html[/url] If you pick your root unwisely, your BST may resemble a linked list. Also consider - the cost of constructing the tree in the first place - the cost of keeping it balanced - the number of searches performed - the distribution of search results. You need the whole … | |
Re: Did you ask your tutor for some guidelines? What about your class-mates, what are they doing? | |
Re: Of course you can do this with C. What you need is a graphical API and you're set. | |
Re: Yes, that's about the size and shape of it. If you want it quicker, store it in memory. If you want it quicker, sort it and use a binary search. | |
| |
Re: > Every year the organization for which I work sells 30 to 45 million dollars worth of timber. > This timber is inventoried and tallied using data recorders running my various DOS > PowerBASIC, QuickBasic or C programs. So its a pretty healthy corpse I'd say. Maybe so, but are … | |
Re: Well did you take account of the fact that usleep takes MICROSECONDS? delay(1000); and usleep(1000); will wait for different times. | |
Re: [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url] Test the result of the read operation. EOF is a state set after the event, not a prediction of the future. Eg.[ICODE] while ( fread( &hardware, sizeof( struct hardwareData ), 1, readPtr ) == 1 )[/ICODE] | |
Re: What you haven't said (or shown) is what you've attempted to do yourself. See the intro threads. | |
Re: Is it that time again? Lemme guess some other exclusions - puts - putchar - write | |
Re: Shunting yard algorithm | |
Re: Quit sniffing the nitrous would be a start. [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] | |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Camel Case | |
Re: Your analysis is correct. But whether there is anything 'wrong' depends on what it's supposed to do. If for example is was a test to see if a number was >= 8, then it would fail miserably on negative numbers. The name 'new' certainly doesn't help. | |
Re: Here's a little game we really don't like playing. It's called "guess the operating system". | |
Re: Here's a procedure [code] if ( firstPostFailed ) { [URL="http://www.daniweb.com/forums/thread134416.html"]tryAgain();[/URL] } [/code] | |
Re: There's no such thing as a "few lines" when it comes to graphics. For a start, each OS/Compiler does it differently, so how about telling us what you have? | |
Re: Your array is DWORDS, but your init function counts bytes. | |
Re: Well you could read the intro threads (there are plenty of opportunities, and you missed all of them. So much for paying attention) which tell you about code tags. | |
Re: How are we supposed to suggest things when we know nothing about - what you actually know - what courses you've been on - what your interests are. No wait, this is another one of those "maximum marks for minimum effort" type posts isn't it. Check out the endless litany … | |
Re: > Can you offer any other interesting metrics to collect? The total number of revisions (across all the branches) divided by the age of the file. Use it to find files which are being edited rather more often than they should. This could indicate sloppy design, poor testing, vague requirements … | |
Re: > BUT since my ultimate goal is to work for a software development company that makes NON-web-based products, Learn COBOL then. 1. There's billons of lines of code out there, and more being added by the year. It just isn't going to get replaced overnight. 2. It's very unfashionable at … | |
Re: If the training company is any good, they'll give you lists of past happy customers. | |
Re: > So am I getting screwed or are most programming jobs like this? Yes and Yes (possibly). Nobody has a clue what they want, so requirements change all the time. Also, requirements change because the rest of the world keeps moving as well. As for the time frame, I'd say … | |
Re: Compare [ICODE]char array[100]; int myStrlen ( void ); // compute length of string in global array[/ICODE] With [ICODE]int myStrlen ( const char *array ); // compute length of string in parameter array[/ICODE] | |
Re: So have you determined whether this is the cause or an effect? Do the threads start off with different instances, but through some other bug in your code they become the same and at that point it crashes. | |
Re: > /* what is "%*s" mean? */ The * suppresses assignment. So this scans a string, but doesn't store it anywhere. Like you have hello 123 in the file, and you want to skip hello and store 123 | |
Re: uniq works on lines, not characters on the same line. |
The End.