Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Apr 2006
Offline Last Active Feb 18 2015 10:30 AM

Posts I've Made

In Topic: Operator Overloading C++

11 February 2015 - 08:50 AM


But to clarify, and maybe I'm wrong, isn't it more accurate to say that the constness of the parameter itself is not part of the signature, but that the constness of an object taken in as a pointer or reference is part of the signature?
In other words a parameter, whether a value, or a reference, or a pointer, const doesn't matter -- but that is not the same thing as that which it is a pointer or a reference to, and its constness, which does matter.

Nope. Const is a compiler-enforced "promise" that can be easily violated with casting or aliasing. AFAIK, the linker doesn't even see it, since the compiler would have done all the enforcement work ahead of time.

Edit: Actually I think I see what you're getting at. And I think you're right. Const has to be part of the signature if the pointed-to object is const, because the compiler has to enforce that you don't pass const objects to parameters that take objects as non-const. But if you're taking it by value it doesn't matter because the value is copied and the copy will be const/non-const no matter what the source was.



He is right indeed, I was writing it up again but you both explained it already.

Quotes from the standard are metioned here on SO: http://stackoverflow.com/a/3681190 and in plain english the post below.

In Topic: Does games that were writen in "c" will be processed faster then...

09 February 2015 - 06:44 AM


C is just C++ without classes and polymorphism.


And without templates, native thread support, or the stl or most other modern C++ features...



Actually, thread support has been introduced with the C11 standard. (Not disagreeing with your point, quite the opposite happy.png , just correcting a piece of the statement)

In Topic: a better fix your timestep?

23 January 2015 - 10:24 AM

I like to build hard core simulations. the type of thing where the delays of network lag are unacceptable, and "prediction" is the most evil thing in the world ever. So on the rare occasions when i do networked games, they're lock stepped to maintain perfect sync. I've gone so far as to write my own protocalls so robust you could unplug the phone line, plug it back in, and not lose sync. but in the end, you can only "ACK" so may "ACKs", and then you have to take it on faith the last one got through.


It's funny that you mention things like simulation where delays, prediction (by which i assume inaccuracies) are unacceptable. Yet you propose and defend a solution in which you present the user with views (renders) where the objects shown reside(? correct word ?) at a different point in time.

These arguments you use against the f-y-t actually prove your own theory as unacceptable for your purpose, and probably most other. (notice the italic part, it may have uses as Hodgman suggests).

In Topic: Function that takes unknown amount of strings, how do i vector?

04 June 2014 - 05:37 AM



Possible i don't have latest c++11?

I'm guessing you're using Visual Studio. VS <2013 doesn't have initializer lists.


I am out dated blink.png...  99$ for 2013 upgrade, too broke ATM for that.

I will make do with horrible syntax.



You can get the Visual Studio 2013 Expess edition for free if it fits your needs. You only have to register your email after 30 days to continue free usage for unlimited period.

In Topic: Enemy only shoots once. Help

19 October 2012 - 10:44 AM

Ah, it seems like there are quite some issues with the [ source ] tags, i always type [ code ] which seems to work fine, maybe a bit less fancy but it get's the job done :)

Good to hear that you fixed the problems!