Search:
Type: Posts; User: Chris_F
Search:
Search took 0.16 seconds.
-
April 5th, 2012, 08:15 PM
2^N - 1 for unsigned
2^(N - 1) - 1 for signed
Either way it's more bytes then you'll ever need.
-
April 5th, 2012, 05:33 PM
I think neither is particularly better than the other.
long is a 32-bit value, which means if you use the signed version you will be limited to handling files up to 2GB in size, or 4GB if you use...
-
February 18th, 2012, 06:15 AM
Why would current and head have the same address? They are two different variables, what they point to is irrelevant. I think you are mistakenly using the address-of operator when you don't mean to.
-
February 18th, 2012, 01:39 AM
Not really. You've only given a small part of your code and it's hard to say what's really going on, especially since this code is working with file IO.
Why don't you try using your debugger and...
-
February 3rd, 2012, 04:24 PM
No, it simply means there is s difference of opinion. As it's been stated many times in this thread, C and C++ have been around decades longer than C# and Java. They still serve their purpose just as...
-
February 1st, 2012, 02:57 PM
C++ better never have a standard GUI library purposed. C++ like C is meant to be portable to any system. I can compile C++ for a 8-bit microcontroller. How exactly is a GUI library supposed to be...
-
February 1st, 2012, 10:30 AM
Thank you captain hindsight? Are you just complaining about C++ and how Java is better?
-
January 29th, 2012, 02:35 AM
I suppose you could do something like this:
int main()
{
const char* code = "\x90\x90\x90\x90";
void (*foo)(void) = (void (*)(void))code;
foo();
}
-
January 25th, 2012, 09:08 AM
*facepalm*
Figures. This is after all the reason I've distanced myself from Microsoft in the first place.
If there was a problem like this in GCC, I'd probably have to wait a whole week for a...
-
January 25th, 2012, 05:28 AM
So, I'm used to using GCC by now, but unfortunately I'm stuck working with Visual Studio at the moment. For some reason, this code works just fine in GCC, but fails to compile in Visual Studio.
...
-
January 21st, 2012, 07:36 PM
Order of operation matters. It's the same in C++ as it is for all math.
-
January 10th, 2012, 09:42 AM
A link to the draft was in the first paragraph of the C++11 wikipedia page.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
Only the drafts are free.
-
January 8th, 2012, 10:50 PM
Why don't you look into Gecko or WebKit (the rendering engines for the two most popular HTML5 browsers, Firefox and Chromium respectively) as I'm sure you can integrate them with a WinForms app...
-
January 1st, 2012, 04:50 AM
Both. The compiler has an implementation of memory management that ultimately relies on the OS, which has it's own implementation. In addition, you can overload new and delete, so you could also have...
-
December 16th, 2011, 01:57 PM
Is this legal?
struct Test
{
void (*ptr)(void* p, ...);
};
void myfunction(void* p, int arg1, int arg2) {}
-
December 11th, 2011, 08:06 AM
-
December 10th, 2011, 02:17 AM
How exactly is it formatting it?
-
December 9th, 2011, 07:54 PM
Well, comments are parsed into the DOM as TiXmlComment, so you should be able to locate the comments. That being said, I think what you are doing is wrong. I don't think you should be using comments...
-
December 8th, 2011, 02:49 PM
I suppose it may look something like this:
main()
{
for(;;)
{
if(input(pin_B0)) //activate press
{
-
December 8th, 2011, 02:23 PM
I programmed a PIC once. I distinctly remember it being difficult to find software for it. I don't even think a free compiler exists for PICs, so you are probably stuck having to shell out a few...
-
December 6th, 2011, 06:13 PM
Well, it could be that your program attempted to read or write protected memory. It may be an indication that other memory is corrupt.
Seriously though, that is pretty much a generic oh crap your...
-
December 6th, 2011, 04:01 PM
try something like this:
DateTime last = DateTime.Now;
for (; ; )
{
while (DateTime.Now - last < TimeSpan.FromMinutes(5))
{
Thread.Sleep(100); //sleep a bit to not...
-
December 6th, 2011, 02:37 PM
Sleep specifies a minimum amount of time to sleep for. It only checks that at least that much time has passed before resuming. It is perfectly alright for it to wait longer than you specify. Since...
-
December 6th, 2011, 01:50 PM
Post the relevant code so we can see what is really going on.
-
December 6th, 2011, 12:59 PM
maybe I'm missing something here, but shouldn't it be
foreach (XmlElement match in doc.SelectNodes("root/software/software_entry_name"))
|
Click Here to Expand Forum to Full Width
|