5,237 Posted Topics

Member Avatar for Nogat21

> 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 …

Member Avatar for Nogat21
0
280
Member Avatar for DaBunBun
Member Avatar for DaBunBun

> 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] …

Member Avatar for DaBunBun
0
132
Member Avatar for NickyU
Member Avatar for mrnutty
0
729
Member Avatar for yakovm

> 1)I need easily to find a minimal value in the database maps have iterators, use one of them perhaps?

Member Avatar for ithelp
0
84
Member Avatar for akulkarni
Member Avatar for the great
Member Avatar for Salem
0
885
Member Avatar for Smoking Bros
Member Avatar for dzhugashvili

> 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 …

Member Avatar for dzhugashvili
0
323
Member Avatar for imwan

[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 += …

Member Avatar for DdoubleD
0
1K
Member Avatar for adel_elrefaey

> #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 …

Member Avatar for adel_elrefaey
0
737
Member Avatar for duggydiggy
Member Avatar for hollywoood

> double monthlyInterest = interest * 12; Not divide by 12 ? > double interest = 5.7; I think this is 570% Seems high to me.

Member Avatar for hollywoood
0
772
Member Avatar for Traicey

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?

Member Avatar for group256
0
227
Member Avatar for eliza2044

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 …

Member Avatar for eliza2044
0
174
Member Avatar for charis89

> 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 …

Member Avatar for Salem
1
164
Member Avatar for zahidaiub

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.

Member Avatar for Salem
0
196
Member Avatar for maudits

> throws some errors Pasting your actual error messages as well would likely help as well.

Member Avatar for maudits
0
295
Member Avatar for PatMcC

[URL="http://en.wikipedia.org/wiki/Shakespeare_(programming_language)"]Have some fun instead![/URL] ;)

Member Avatar for xeolabs
0
235
Member Avatar for Salem

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 …

Member Avatar for frk
4
585
Member Avatar for muusa
Member Avatar for muusa
0
119
Member Avatar for avukadomusic

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).

Member Avatar for avukadomusic
0
166
Member Avatar for user98
Member Avatar for Salem
Member Avatar for duggydiggy

> 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 …

Member Avatar for Salem
0
200
Member Avatar for sara9111
Member Avatar for edwardo12

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]

Member Avatar for edwardo12
0
112
Member Avatar for alvalany

> 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 …

Member Avatar for alvalany
0
204
Member Avatar for anakha6
Member Avatar for duggydiggy

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 …

Member Avatar for Salem
0
89
Member Avatar for C.c

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.

Member Avatar for ithelp
0
118
Member Avatar for JUNEROSE

> 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.

Member Avatar for Chaky
0
148
Member Avatar for basitchk
Member Avatar for Stefano Mtangoo
0
83
Member Avatar for yasaswyg

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.

Member Avatar for yasaswyg
-1
122
Member Avatar for tarekwehbe

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?

Member Avatar for mrnutty
0
129
Member Avatar for kiuhnmgtrdcv

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.

Member Avatar for kiuhnmgrtdcv
0
973
Member Avatar for compiler777
Member Avatar for romeyng

Yes you should, and writing "I'm lazy" and grinning about it does you no favours.

Member Avatar for Salem
0
44
Member Avatar for snag49ers
Member Avatar for snag49ers
0
98
Member Avatar for Statler
Member Avatar for morland

[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.

Member Avatar for Rik_
0
248
Member Avatar for himgar

[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, …

Member Avatar for necrolin
0
104
Member Avatar for seakayaker
Member Avatar for S.DALI

> 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 …

Member Avatar for S.DALI
0
82
Member Avatar for densman
Member Avatar for auto9817

> 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 …

Member Avatar for Salem
0
157
Member Avatar for renovat0

[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]

Member Avatar for renovat0
0
110
Member Avatar for nick_krambo

I would check those results with an actual multimeter to make sure the readings are accurate.

Member Avatar for Chaky
0
74
Member Avatar for Hawkpath
Member Avatar for zimis

> 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 …

Member Avatar for Salem
0
304

The End.