5,237 Posted Topics
Re: Sure - it's been asked many times before. Search the forum. | |
Re: Why are you presuming that it's the compilers' fault, and not your code? Your first time success is at best 90% skill and 10% luck. > The program is very complex, and big, so I do not want to recompile it Well that's what you'll have to do. | |
Re: It's quite simple, you take char phone[] = "0000000"; Then write a function to do addition like you would on paper. char phone[] = "0000001"; When you get to char phone[] = "0000009"; the next one will be char phone[] = "0000010"; | |
Re: Have you read beej yet? [url]http://beej.us/guide/bgnet/[/url] | |
Re: > //A quicker method is to simply use the value as an Except your other two methods never risk an out of bounds memory access. > 1. unsigned int arithmatic is faster than signed int. Where's your evidence? > 2. registers are registers ! They're simply faster than memory access. … | |
Re: > is there a reason why you WOULD NOT want to use wxwidget? As opposed to the dozens of other UI toolkits out there, with more or less portability. If you already know another UI toolkit, and are happy with it's level of portability, then why bother with another one? | |
Re: So look at your diagram, and work out the sequence of 2 2 3 3 4 4 etc. | |
Re: > wrd = (char*)realloc(wrd, (wrd_len+1)*sizeof(char)) 1. was it really worth dropping a single letter? 2. wrd_len never gets incremented. 3. you're assuming the memory returned by realloc is zero filled - it isn't. 4. your use of realloc is unsafe, but more on that later no doubt. | |
Re: Start with fgets() to read each line. Then say strncmp() to find the temp lines. Then see what else you can figure out. Post code here when you're stuck. Don't forget to read the "how to post code" threads, and code tags, and all that jazz. | |
Re: Who knows, unless you post your actual code. Perhaps you've got the serial port set to 7-bit characters, so the MSB is stripped. | |
Re: Use a library? [url]http://libxmlplusplus.sourceforge.net/[/url] | |
Re: In dev-c++, add these options for the compiler [ICODE]-W -Wall -ansi -pedantic[/ICODE] Then it won't compile under dev-c++ either. | |
Re: Announcement Announcement: We only give homework help to those who show effort | |
Re: > The line of code this warning refers to defo=(defo/16.0); 16.0 is a double defo=(defo/16.0[COLOR="red"][B]f[/B][/COLOR]); Adding a trailing f would make a float version of 16.0 | |
Re: Sure, a lot of people do this. [url]http://clusty.com/search?query=remote+home&sourceid=Mozilla-search[/url] Whether you use your phone to send an SMS or a web browser doesn't make much difference. | |
Re: Run it in the debugger, and let it catch the segfault. Then look around for the cause. | |
Re: The error is in the chair. The error didn't read "how to post code" threads all over the forum. The error needs to do better at making a post which is readable. | |
Re: [url]http://clusty.com/search?query=maxtor+rigel&sourceid=Mozilla-search[/url] Lots of interesting reading. [url]http://www.dataclinic.co.uk/bios-codes-maxtor-hard-disk.htm[/url] [url]http://www.phuket-data-wizards.com/en/maxtor-failures.php[/url] [url]http://www.xytron.co.uk/maxtor-hard-drives.html[/url] [url]http://www.vitaldata.ca/maxtor-data-recovery.html[/url] Seems more mundane than malicious. | |
Re: > memset(m_buffer,ch,count); So when did m_buffer get allocated? | |
Re: Maybe [url]http://clusty.com/search?input-form=clusty-simple&v%3Asources=webplus&query=audio+analysis+algorithm[/url] | |
Re: What options have you come up with so far? You know, like a short list of possible candidates. | |
Re: Copy the example dot.bash_profile to your home directory as .bash_profile Then start uncommenting the bits you would like, and adding any new things you would like. | |
Re: [url]http://www.linux-usb.org/usb.ids[/url] You need to make your device return the right vendor/device ID, and supply windows with the appropriate INF file which allows it to install the correct drivers. More USB developer info here [url]http://www.lvr.com/[/url] | |
Re: We've been over this before [url]http://www.daniweb.com/forums/thread168362.html[/url] [url]http://www.daniweb.com/forums/thread169071.html[/url] Your problem is bound by the realities of your hardware. | |
Re: Use any language(s) you like. Just because someone uses say C++, that doesn't mean that using Fortran is impossible. Nearly all programming languages are equivalent [url]http://en.wikipedia.org/wiki/Turing-complete[/url] If you've got a network API and a graphics engine, the rest is pretty much a data processing exercise. | |
Re: It really depends on what you want to achieve. [code] // disallow param = something and *param = something void doSome(const int * const param) // param can be changed, but what it points to cannot void doSome(const int * param) // you can't change param, but *param = something … | |
Re: > Your home planet is: Silbob Silbob Howdy neighbour :) | |
Re: No, go away and think for yourself. Or better yet, search this forum for all the other lamers who roll past with "please suggest a project" threads. You've been on a course for several years, has NOTHING inspired you to think "hey, that would be good....". If not, you've wasted … | |
Re: If you call malloc, then you need to call free. The compiler looks after allocation and deallocation of local variables. | |
Re: Perhaps something more meaningful than A B C etc | |
Re: To stop the chicken from crossing the road. Or perhaps close the window of opportunity to malware when the OS is only partially installed, with network up and NO firewall configured. | |
Re: Maybe, why not do a search for #ifdef on all the library header files? | |
Re: Or just keep repeating the question until you bore someone into submission? [url]http://www.daniweb.com/forums/thread168747.html[/url] | |
Re: > char *customer; //251 including null byte > char accountNumber[20 + 1]; //16 including null byte This is C++, use std::string and move on? | |
Re: > sed -i 's/oldInfo/newInfo/g' "$dataFile" You need to watch your shell's quoting rules. Things in single quotes are preserved as is Things in double quotes allow $substitutions. Perhaps then sed -i "s/$oldInfo/$newInfo/g" "$dataFile" | |
Re: Very good, now try it with something else, like a float or a struct or a pointer. It's a cheap trick, not programming knowledge. | |
Re: 1. It's \0, not /0 2. Your main() is inside your class, it should be outside. | |
Re: [url]http://www.ss64.com/bash/gawk.html[/url] Eg. [code] awk -v find="Fred" 'BEGIN{FS=","; RS="\n"} [COLOR="Green"]$1 == find[/COLOR] {printf "%s, %s, %s, %s\n", $1, $2, $3, $4}' data.txt [/code] Just replace the green code with whatever test you like. | |
Re: Two things 1. 0xfd is used to fill memory after it has been deleted, just in case you try to use it later. So when you see 0xfd all over the place, that is what you should be thinking about. 2. The access violation says "writing", so it's a safe … | |
Re: Did you learn anything from your previous thread? [url]http://www.daniweb.com/forums/thread168362.html[/url] Or are you going to show us what you've tried? Or are you just going to keep repeating the same refrain until you get bored, or we magically stumble on an answer which you like the look of, even if it's … | |
Re: > I'm also a C++ newbie, so this was a good learning experience for me as well. Unfortunately, you learnt how to do it (good), and the OP learnt that persistence will sometimes get you a free lunch (or in this case, homework on a plate). This is not good. … | |
Re: So what do you need help with? Improving your C++ knowledge to help you write the code? Improving your google knowledge to help you find the answers with minimal effort? | |
Re: The challenge is for dim-wits like you to come up with a half-decent attempt at doing their own homework. Or at least come up with a better way of disguising the fact that it is homework. Fact is, so far, you've failed miserably at both of them. | |
Re: Sure, just tell us which Operating System and compiler you're using. Though I've got a sneaking suspicion you're going to say XP and Turbo C for some reason... | |
Re: [code] CreateProcess ( "C:\\abc.exe", " \"C:\\Documents and Settings\\xyz.exe\" 2", NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi ); [/code] Some well-placed \" perhaps? | |
Re: Wrong kind of assembly I'm afraid. This forum deals with various assembler languages (MASM etc), and not the .Net "assemblies". | |
Re: Seems more like a case of include "file.cpp" in multiple places (this is a bad thing to do). |
The End.