5,237 Posted Topics

Member Avatar for bikeha

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.

Member Avatar for bikeha
0
286
Member Avatar for BestJewSinceJC

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.

Member Avatar for BestJewSinceJC
0
170
Member Avatar for retchedmonkey

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.

Member Avatar for xavier666
3
432
Member Avatar for bahr_alhalak

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

Member Avatar for jephthah
-2
124
Member Avatar for n.utiu

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 …

Member Avatar for n.utiu
0
227
Member Avatar for dude1
Member Avatar for dude1
0
172
Member Avatar for mrnobody

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 …

Member Avatar for mrnobody
0
145
Member Avatar for Icebone1000

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?

Member Avatar for Salem
0
105
Member Avatar for dwdude

>[ICODE] (someclass->test->*funcptr)(2, "Lol"); [/ICODE] Remove the * [ICODE](someclass->test->funcptr)(2, "Lol");[/ICODE]

Member Avatar for dwdude
0
2K
Member Avatar for blainegeneral

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

Member Avatar for Salem
0
208
Member Avatar for bigt666

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

Member Avatar for WaltP
0
227
Member Avatar for LevyDee

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

Member Avatar for LevyDee
0
88
Member Avatar for johndoe444

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 …

Member Avatar for Salem
0
95
Member Avatar for Dudani

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

Member Avatar for Dudani
-1
7K
Member Avatar for mebob
Member Avatar for robertl2
0
159
Member Avatar for Salem

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 …

Member Avatar for Biker920
7
175
Member Avatar for cwarn23

Tomorrow, this news is 5 YEARS OLD [url]http://www.schneier.com/blog/archives/2005/02/sha1_broken.html[/url]

Member Avatar for cwarn23
0
653
Member Avatar for emilo35

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

Member Avatar for emilo35
0
291
Member Avatar for kirennian
Member Avatar for Salem
0
129
Member Avatar for akssps011

In C++, you should be using [ICODE]new [/ICODE]and [ICODE]delete[/ICODE], or [ICODE]new[][/ICODE] and [ICODE]delete[][/ICODE]

Member Avatar for akssps011
0
113
Member Avatar for nateuni

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

Member Avatar for Etherwind
0
98
Member Avatar for Syphilis
Member Avatar for bops

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

Member Avatar for Raptor007
0
1K
Member Avatar for Ancient Dragon

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.

Member Avatar for diafol
0
242
Member Avatar for ParadoxKing
Member Avatar for Salem
0
412
Member Avatar for yuriythebest
Member Avatar for Salem
0
42
Member Avatar for Buckoo

So use one of the several XML parsers which are available at the end of any search engine. [url]http://expat.sourceforge.net/[/url]

Member Avatar for Salem
0
112
Member Avatar for sbnaveenkumar
Member Avatar for Salem
0
101
Member Avatar for tesaluna32

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

Member Avatar for Salem
0
69
Member Avatar for sthato

[url]http://clusty.com/search?query=Writing+use+cases&sourceid=Mozilla-search[/url]

Member Avatar for Salem
0
27
Member Avatar for neigyl_noval

You're using a 16-bit assembler, and those registers are only accessible from 32-bit programs.

Member Avatar for Salem
0
68
Member Avatar for blackmagic01021

And we're supposed to guess(believe) that you declared [B]AND [/B]allocated [B]ALL [/B]your buffers correctly?

Member Avatar for Salem
0
718
Member Avatar for abcz
Member Avatar for Salem

I must say that I'm really liking the new prefix the mods are applying to threads wrested from the clutches of the zombies :)

Member Avatar for ~s.o.s~
2
339
Member Avatar for rajdey1

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 …

Member Avatar for lafigueroa
0
153
Member Avatar for Pynolathgeen

> packet = Client->Recv(); Can you post the code for Recv() and Send()?

Member Avatar for Pynolathgeen
0
243
Member Avatar for Sschneid

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

Member Avatar for Salem
0
97
Member Avatar for samurai1200

The prototype needs to be [ICODE]void deal (user&, user&, card[]);[/ICODE] if you want to modify the details of the user and dealer.

Member Avatar for samurai1200
0
1K
Member Avatar for spetsnaz26

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.

Member Avatar for spetsnaz26
0
120
Member Avatar for strmstn

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.

Member Avatar for strmstn
0
204
Member Avatar for vivekvxz

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

Member Avatar for Nick Evan
0
574
Member Avatar for Adnan Saleem

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

Member Avatar for BestJewSinceJC
-1
3K
Member Avatar for ckjie

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.

Member Avatar for Salem
0
166
Member Avatar for aLLtIMElOW

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

Member Avatar for Salem
-2
145
Member Avatar for tnecniv

> data[B][COLOR="Red"]* *[/COLOR][/B]b = new data*[_n]; Why two *'s here?

Member Avatar for tnecniv
0
106
Member Avatar for shoby

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.

Member Avatar for jmsDC
0
469
Member Avatar for johndoe444
Member Avatar for Skifter
0
266
Member Avatar for spookytr

[url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044842972&id=1043284392[/url]

Member Avatar for Salem
1
67
Member Avatar for SCoder1
Member Avatar for Salem
0
81
Member Avatar for mnewsome

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 …

Member Avatar for Salem
0
92

The End.