5,237 Posted Topics
Re: Standard C++ doesn't know about screens or graphics or pixels. You need to say more about your setup (OS, Compiler etc) Start by practising simple stuff, like say just drawing a line. | |
Re: A real pre-emptive OS would need a clock interrupt (from the outside world) to function. This would be capable of interrupting "while(1);" and give control back to the OS to decide on something else to do. | |
Re: What a fantastic first post! Code tags and nicely indented code - top notch stuff. > The output always reads 0 0 0. scanf("%s") uses all white space as a delimiter, so no spaces etc will ever appear in your string. Try [ICODE]fgets( s, sizeof(s), stdin );[/ICODE] instead. | |
Re: Forget it, it's just a crummy word document in the zip file - no code at all. [url]http://www.daniweb.com/forums/announcement118-2.html[/url] Ok, let's make your 50th post something along the lines of: "Yes, I have read the forum rules and here is my honest best effort at solving part of the problem". | |
Re: As opposed to the other confusion which would result when trying to explain that ^^ does NOT do short-circuit evaluation like && and || does. > Let's take this case: 2 == 2 ^ 2 generates a logical operation instead of bitwise operation Huh? 2^2 is zero. If you wanted … | |
Re: If it's an XML file, why not use an XML library? There are several around. | |
Re: We're missing the rest of the code. Random "memory corruption" bugs generally mean the problem could be anywhere else in the code EXCEPT the part you're staring at and the handful of lines you've posted. A small and complete self-contained example which shows the same problem would allow us to … | |
Re: Perhaps you should explain why you don't have a pointer of the correct type to begin with. [ICODE]pVBRes = new anotherType[someSize];[/ICODE] If you do this elsewhere, what is to stop you performing the wrong cast? | |
Re: >[ICODE] (someclass->test->*funcptr)(2, "Lol"); [/ICODE] Remove the * [ICODE](someclass->test->funcptr)(2, "Lol");[/ICODE] | |
Re: > No, I have the implementation code in separate files. Then you didn't include the separate file in your project. The project needs a list of all your .cpp files. | |
Re: [code] <<"Enter 1 to build a square root, log10 table \n" <<"Enter 2 to play rolling two dices \n" <<"Enter 3 to print a calendar for 2008 \n"[/code] In addition to having a function to display the menu, you should have a further 3 functions, one for each specific choice. … | |
Re: [url]http://people.cs.ubc.ca/~harrison/Java/sorting-demo.html[/url] Well it depends on what you're doing. 50 years of research and dozens (if not hundreds) of algorithms means there isn't a single "one size fits all". A 10-slot game highscore table, which is already sorted (except for the entry you just added) doesn't need you to implement anything … | |
Re: First, you compile with debug [ICODE]gcc -g prog.c[/ICODE] Second, set the coredump limit in the shell (if you're using BASH, otherwise, read your manual) [ICODE]ulimit -c unlimited[/ICODE] Run the program, and get a crash. What you also get is a corefile (perhaps called core) You can then do [ICODE]gdb program … | |
Re: >Need an answer And we need YOU to read the forum rules and make an effort. [url]http://www.daniweb.com/forums/announcement118-2.html[/url] You didn't even ask a question. You just dumped your assignment! | |
Not only does bugger all get done about students posting crappy "do my homework NOW" posts. [url]http://www.daniweb.com/forums/thread268437.html[/url] and [url]http://www.daniweb.com/forums/thread265286.html[/url] We can't even discuss ways to challenge their behaviour. [url]http://www.daniweb.com/forums/thread267094.html[/url] Polite explanation of the rules doesn't work - why would it, they skipped past them the first time around. Harassment and … | |
Re: Tomorrow, this news is 5 YEARS OLD [url]http://www.schneier.com/blog/archives/2005/02/sha1_broken.html[/url] | |
Re: > size_t t1 = fread(TGAcompare,1,sizeof(TGAcompare),file); Although it looks pretty, this isn't the way to read a binary file. The compiler is free to add padding and alignment to the struct, which the external file format will know nothing about. So what you actually read will be skewed compared to what … | |
Re: Well which OS/Compiler/GUI system are you using? None of this is standard C++. | |
Re: In C++, you should be using [ICODE]new [/ICODE]and [ICODE]delete[/ICODE], or [ICODE]new[][/ICODE] and [ICODE]delete[][/ICODE] | |
Re: Maybe this? [url]http://www.itl.nist.gov/div897/sqg/dads/[/url] If it isn't, then don't forget to reply with "too easy" or "too hard". | |
Re: If you don't want a window, why are you creating one? | |
Re: > >> len = sprintf(NULL,"This is my forename: %s",fname); > seems to work perfectly!!! > Is there an assurance that the string will not be written if NULL is passed? > I believe not. Is this undefined behavior? It certainly is undefined behaviour. However, if you have a C99 compiler, … | |
Re: I know you yanks like spelling English words differently, but seriously, it's "Throne", not thrown (which is the past participle of throw). "Tabloids" and "rumours" - yep, seems about right. ![]() | |
Re: Use a debugger, and it will point you at the line of code which is dereferencing a NULL pointer. | |
Re: Well speaking of vague.... Your post makes very little sense to begin with. | |
Re: So use one of the several XML parsers which are available at the end of any search engine. [url]http://expat.sourceforge.net/[/url] | |
Re: There are plenty of examples on the board for that kind of conversion. | |
Re: [url]http://www.daniweb.com/forums/announcement125-2.html[/url] Nor do we know which assembler you're using, or for which processor. First question is, could you write it in some high level language? | |
Re: [url]http://clusty.com/search?query=Writing+use+cases&sourceid=Mozilla-search[/url] | |
Re: You're using a 16-bit assembler, and those registers are only accessible from 32-bit programs. | |
Re: And we're supposed to guess(believe) that you declared [B]AND [/B]allocated [B]ALL [/B]your buffers correctly? | |
Re: Took a lot longer than 2 minutes.... | |
I must say that I'm really liking the new prefix the mods are applying to threads wrested from the clutches of the zombies :) | |
Re: 1. Your indentation sucks - no wonder you can't find anything wrong with it, it's way too hard to trace your way through it. This is some improvement, but it could still be better. [code] #include<iostream.h> #include<process.h> #include<stdio.h> struct list { int data; list *next; list *previous; }; class integer … | |
Re: > packet = Client->Recv(); Can you post the code for Recv() and Send()? | |
Re: - make sure you have a backup of anything you want to keep - make sure you have an OS install disk, and registration key - make sure you have driver disks for video cards (or any other unusual hardware). Get the latest drivers from manufacturer websites. If your OS … | |
Re: The prototype needs to be [ICODE]void deal (user&, user&, card[]);[/ICODE] if you want to modify the details of the user and dealer. | |
Re: Use a debugger, and set up a data access breakpoint on the address in question. It will break whenever that location is read or written. | |
Re: Your compiler will have read the entire function, and worked out in advance just how much space each local variable would need (and the total space). At code generation time, the right amount of stack space can be reserved. | |
Re: I think the universe would have been much better off if you'd just deleted the post Walt. Most everyone here would be glad to see someone so lazy to "flame out" of the course they're on. The OP should get their "flame on" down at the local burger joint instead. … | |
Re: > a homework scheduler Yeah, first the homework gets scheduled to be run on brain #1, but brain #1 is too dumb / lazy / thinking about the weekend. So it tries to get the homework scheduled on brain #2 instead. | |
Re: I think they've screwed up the compiler installation by editing stdio.h at some point in an attempt to solve a problem. Now, every project is broken. Re-install the compiler and SDK. | |
Re: > Note: you are only required to write the function definition. Thus, you are not allowed to make > any modifications in the main function and on the function prototypes. So from this > int fSelectMenu (); Write this [code] int fSelectMenu () { return 0; } [/code] Now do … | |
Re: > data[B][COLOR="Red"]* *[/COLOR][/B]b = new data*[_n]; Why two *'s here? | |
Re: OK, so what have YOU managed to achieve so far? [url]http://www.daniweb.com/forums/announcement118-2.html[/url] This isn't somewhere where you can just dump your assignment and come back after your party expecting a complete answer for you to hand in. You're going to have to pull your own weight. | |
Re: You click on the link above the tagged code saying "show plain text". Then copy/paste. | |
Re: [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044842972&id=1043284392[/url] | |
Re: [url]http://www.lvr.com/[/url] has lots of good information on USB | |
Re: Like a real machine, it has a BIOS where you can do say "Press F2 for setup". There you should be able to set "boot from CD" - it appears to be trying to boot from the network at the moment. Within VPC itself (just guessing based on using VMWare … |
The End.