Type: Posts; User: Peter_B
Search took 0.04 seconds.
October 1st, 2013, 02:56 PM
This is just anti-aliasing. You can control how text is rendered using the Graphics.TextRenderingHint property
September 13th, 2013, 08:48 AM
The way I've always understood this is that the term 'bug' had been used to describe all sorts of faults in mechanical items for a long time, but when this moth was found it helped to popularise the...
September 13th, 2013, 08:13 AM
If it is a hoax, someone should tell the US Navy - they named a guided-missile destroyer after her: http://www.hopper.navy.mil/ :D
She was also the first person to develop a compiler - see...
August 31st, 2013, 10:20 AM
You can't even be bothered to wrap this up into a complete program and run it to get the answer, yet you expect us to write two programs for you? :mad:
August 6th, 2013, 09:13 AM
Your example is really no different to
July 20th, 2013, 11:53 AM
FlexeLint isn't a compiler, it is a static code analysis tool. I.e. you can use it as a supplementary tool in conjunction with a compiler. Compilers nowadays are adding more and more warnings for...
July 19th, 2013, 06:31 AM
This is the sort of bug that programs like lint can help with. Using the online demo of FlexeLint at http://www.gimpel-online.com/OnlineTesting.html (choose the Simple Example (C++) and replace the...
June 22nd, 2013, 03:06 PM
Yes, I got it wrong with the string literal bit :o mathmari's code wasn't trying to alter the literal itself, but rather the copy which is in the char array. Thanks for correcting me. I'm so used to...
June 20th, 2013, 06:10 PM
You have a little bug in func(). Run it through the debugger -you'll spot it eventually... :D
Also, don't use gets() - it's dangerous, and has been deprecated. For input it is safer to use streams...
June 20th, 2013, 06:00 PM
1) Change to use std::string instead of char arrays, or
2) Create a char array on the heap using new and initialize this array to contain "VENICE" (plus the null-terminator)
June 20th, 2013, 05:49 PM
You are trying to modify a string literal ("VENICE"). This will cause undefined behaviour.
June 19th, 2013, 11:58 AM
@LarryChen: Don't assume the answer will always be the same as this, though. On my system (Ubuntu Linux using g++ 4.2.3) the following code (Philip Nicoletti's code with some output added):
June 12th, 2013, 02:40 PM
June 12th, 2013, 02:09 PM
Depends upon how it should work :). Either:
1) Change the code to read the file as plain-text, or
2) Change the file so the data is binary-coded.
June 12th, 2013, 01:57 PM
Your file is in plain-text format but you are reading it as if it is a binary-coded format. That's why you get what looks to be junk.
April 4th, 2013, 08:08 AM
Recently, whenever I have looked at the 'Who's Online' page I get the same effect. But the split is always at the same user.
I.e. the first page is everyone upto (and including) lfuser.
March 31st, 2013, 06:23 PM
Remember to always check the code works for corner cases. For example, what will this code do for a zero-length string? Hint: it will try to access an invalid index.
March 2nd, 2013, 05:26 PM
Yes, I thought this was probably what was wrong.
Symus, when you originally coded postorder did you copy and paste preorder and just move the cout line?
February 28th, 2013, 01:07 PM
You must have made a mistake somewhere - it works fine for me. NB: when I said exactly as preorder, except... I meant the same structure. I.e. the postorder method would call the postorder method for...
February 27th, 2013, 05:49 PM
Why are your preorder and postorder methods structured differently? You could have written postorder exactly as preorder, except with the 'cout << data' part at the end. There is no need for it to...
November 30th, 2012, 06:13 PM
Here's a hint - look at all the entries where the result (number on the right) changes from the previous line.
November 30th, 2012, 05:56 PM
Exactly this happened to me also, and it was my post :(
I was starting to think the upgrade had become self-aware and was removing any posts containing suggestions to remove it. :D
November 29th, 2012, 06:33 PM
This has probably been said before, but why can't the 'upgrade' be rolled back? It has caused many problems, with there still (after 6 months!) being no end in sight.
I know it would be...
November 28th, 2012, 08:25 AM
The original code has a space character where the minus sign now is - so it is replacing the space.
November 15th, 2012, 07:37 AM
Whoever wrote the specifications for this was a bit sloppy. Simply returning 'true' for any input would fulfil this requirement :D
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!