5,237 Posted Topics
Re: > file.write(tit,30); If you're going to write 30 bytes, then you need [ICODE]char tit[30] = "Title";[/ICODE] otherwise you're reading uninitialised memory and storing up who knows what kind of trouble. > file.read(test,4); This won't have a \0 at the end (unless the file happens to have a \0, which seems … | |
Re: > So i looked at MPI_Init.h, and it doesn't seem to actually use argc and argv for anything. Well you won't, looking at the .h. If you've got no desire to control MPI from the command line, then [CODE]MPI_Init(0,NULL);[/CODE] seems like a good bet. Or if that fails, try [code] … | |
| |
Re: > 1)I need easily to find a minimal value in the database maps have iterators, use one of them perhaps? | |
Re: [url]http://lmgtfy.com/?q=apache+tomcat[/url] | |
Re: Correct indentation, and proper use of { } in all the places you need them would help. | |
Re: In draw.h, you should have extern Game game; In game.cpp, have Game game; | |
Re: > how does --stdout work (as far as implementation in C++)? How can I output my words? Something with cout? Exactly. You parse your command line, and if some argv[i] is "--stdout" then you output to stdout. Otherwise, one would presume it expects a filename on the command line, and … | |
Re: [code] cline = new char[sline.length()+1]; strcpy(cline, sline.c_str()); chr = strtok(cline,","); data.ticker +=string(chr); fileName +=string(chr); aChr = chr; [COLOR="Red"]strcat(aChr, ".txt");[/COLOR] fileName =string(aChr); [/code] This happens on your char array, where there is only just room for the characters you read, nevermind adding .txt to it. 1. You're always doing fileName += … | |
Re: > #include<iostream> using namespace std; Although its not good Except it appears to be a C program from the logs. But then again, who knows, the whole mess was posted without code tags to begin with. Don't people READ intro threads? Of course not, that would get in the way … | |
Re: [url]http://linux.die.net/man/1/objdump[/url] | |
Re: > double monthlyInterest = interest * 12; Not divide by 12 ? > double interest = 5.7; I think this is 570% Seems high to me. | |
Re: You're opening the file in append mode. Are you sure you're not looking at the data from previous runs, where you might have had a different order to the data? | |
Re: You can't insert into a text file. Read the whole thing in, make some changes, then write it all back out again. But as it seems to be XML, there's bound to be some handy class which makes easy work of serialising the data, and with access methods which allow … | |
Re: > First-chance exception at 0x004185bc in BinaryTreeGame.exe: 0xC0000005: Access violation reading location 0xcdcdcded. Heap memory (in debug mode) gets filled with 0xcd when you free it. > inorder(p->llink); //<-- there is a yellow arrow pointing here p or p->llink is pointing to a node which no longer exists. Did you … | |
Re: Lemme guess, you're running TurboC on XP? Do you want the information for the VM TurboC runs in, or the real machine XP is running in. I run XP inside VirtualBox, so there are now 3 possible answers to your question. | |
Re: > throws some errors Pasting your actual error messages as well would likely help as well. | |
Re: [URL="http://en.wikipedia.org/wiki/Shakespeare_(programming_language)"]Have some fun instead![/URL] ;) | |
This is a catalogue of some experiments on just two aspects of undefined behaviour. This was inspired by yet another long bout of explanation in a recent thread, so I thought it was time to dust off a bunch of compilers, and compare. This is the test code. [code] #include … | |
Re: Oh yeah! [url]http://www.daniweb.com/forums/thread210533.html[/url] | |
Re: People tinker with the layout and format of web pages all the time. Start by verifying the input data is as you expect (visit it with a browser). | |
| |
Re: > int a; //which is a definition Actually, this is just a [URL="http://dirac.uos.ac.kr/lang/ccc/Language_Reference/DOCU_004.HTM#tentative_definitions_sec"]tentative definition[/URL] At the point of compiling it, storage space is not yet allocated to it, so you won't find it as such in the object file. If you said nothing else, then the linker would create a … | |
Re: Read the intro threads on how to use code tags. | |
Re: You mean this? [url]http://www.bleepingcomputer.com/virus-removal/remove-total-security[/url] [url]http://www.myantispyware.com/2009/03/21/how-to-remove-total-security-uninstall-instructions/[/url] | |
Re: > unfortunately I cant dump this compiler right now because our syllabus still follows it. Until your country gets it's act together and starts teaching students something used in the real world, I won't worry about out sourcing. Tell your tutor that this fossil is NOT preparing you for a … | |
Re: Probably because MS chose to make long double and double the same thing. A long double is IIRC only 80 bits (10 bytes), but to preserve alignment, the compiler rounds out the size to a multiple of 4. The underlying architecture isn't the whole story. Running crusty old 16-bit turboc … | |
Re: My first suggestion would be to read up on functions, and then split main() into something more manageable (say 1 function per top-level menu option). Several hundred lines of poorly indented code isn't good to read. | |
Re: > somewhen I changed the A & B drives around in BIOS Can you get to this point again? Even machines 10 years old have a lot of different options. One of them should be C:, which would boot the OS off the primary hard disk. | |
Re: Well, showing something of what you know about linked lists would be a start. Then we have something to work with. With no effort on your part, our choices are - ignore you - do your homework for you. Neither are beneficial to you. | |
Re: Just so we're all clear, your instructor gave you a number of source files which approximately do what you want, but for some reason there are - some syntax errors - some missing functionality which YOU are supposed to fix? Have you fixed any? | |
Re: My question is, why are you still using fossil-ware? I mean, how many Gigs of (processor speed, memory, hard disk) do you have? A whole football field to play in, and you're still scribbling on the back of an old envelope. | |
Re: Yes you should, and writing "I'm lazy" and grinning about it does you no favours. | |
Re: Why not just call getFileList() recursively if you have a directory? | |
Re: [url]http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx[/url] Includes how to turn it off (involves a registry edit, so exercise some care). But that won't fix the underlying problem of why things keep crashing in the first place. | |
Re: [url]http://info.borland.com/borlandcpp/turbosuite/turbo45.html[/url] Turbo C++ 4.5 for Windows 3.1 16-bit C and C++ development for Windows It isn't a DOS compiler, and it isn't an XP compiler. Just because you managed to make "hello world" work doesn't mean that it's a good choice for all your future software development. For a start, … | |
Re: [url]http://www.daniweb.com/forums/announcement8-3.html[/url] | |
Re: > and i hope that those information will help you to minimize the search domain so you can help me. It hasn't helped you, why do you think it will help us? Look around, this forum is littered with "final year project" posts from a litany of people unable to … | |
Re: A web search for e-voting and some reading perhaps. | |
Re: > Can I expect some speed increase using above options? You can certainly expect a change, so you might consider that some of them would be quicker. But saying which would be quicker in advance would be pure guess-work. > If so, would it be significant? Doubtful. +/- 10% between … | |
Re: [code] if ( [URL="http://www.daniweb.com/forums/thread78223.html"]ReadBeforePosting()[/URL] == true && [URL="http://www.daniweb.com/forums/announcement8-3.html"]PostHasCodeTags()[/URL] == true ) { // reward OP with answers } else { [URL="http://www.catb.org/~esr/faqs/smart-questions.html"]MoreCluesOnHowToDoBetterNextTime();[/URL] } [/code] | |
Re: I would check those results with an actual multimeter to make sure the readings are accurate. | |
| |
Re: > recv( sock,buff,255,0); 1. You ignore the return result. 2. Despite all your memsetting, you still have the potential for a buffer overflow. If the recv() happens to FILL your buffer, there is no \0 at the end of it to mark the end of the string. 3. TCP is … |
The End.