Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Mar 2007
Offline Last Active Jun 29 2014 08:36 PM

Posts I've Made

In Topic: Zooming about to a point (2D surface)

24 February 2013 - 10:20 AM

Works Great! thanks


In addition to your formulas, I averaged the new m_x and m_y values with the old ones so they were not changed so drastically. Seems really smooth now.

In Topic: Visual Studio Express 2012 Yay

03 October 2012 - 12:30 AM

For anyone that don't know, if you're a college student you can go to
dreamspark dot com and download the professional edition for free and skip the express all together.

In Topic: Problem passing a reference to my templated functions

21 August 2012 - 08:56 AM

Nope it would fail you would have to initialize it in the factories constructor.

class ThreadingFactory {
		 ThreadingFactory(LogManager& mLog)
		 : mLogger(mLog)
	    IMutex* const CreateMutex()
		  IMutex* ret = NULL;
		  ret = mMemoryAllocator.AllocateObject<Mutex>(mLogger);
		  return ret;
	    ILogManager& mLogger;
	    Allocator mMemoryAllocator;

references must be initialized. You would have to pass factory an instance of the logger class.

In Topic: Writing %-symbol to a string? (c++)

16 August 2012 - 10:41 AM

Is there any way to write it so it always becomes an acutal "%" in the end? Different function now demand different amount of % to "bypass the format".

This sounds like the most fragile coding i've heard about in recent years.

Don't format the string multiple times. Each function should take an unmodified string. mutate copies but leave the original unchanged.

In Topic: Polymorphism and pointer arrays in c++

27 July 2012 - 11:22 PM


I think you meant

objects.push_back(std::unique_ptr<Object>(new IntObject(1)));
objects.push_back(std::unique_ptr<Object>(new StringObject("Test")));

Or maybe not, if your compiler doesn't force you to be so verbose. VS10 does.

Also you forgot to give Object a virtual dtor.