push_back vs emplace_back

In addition to what visitor said : The function void emplace_back(Type&& _Val) provided by MSCV10 is non conforming and redundant, because as you noted it is strictly equivalent to push_back(Type&& _Val). But the real C++0x form of emplace_back is really useful: void emplace_back(Args&&…); Instead of taking a value_type it takes a variadic list of arguments, so that means that you can now perfectly … Read more

How to fix “namespace x already contains a definition for x” error? Happened after converting to VS2010

I had this happen to me about a year ago and I don’t remember exactly what the root cause was, but there are two things you might try: If it’s an auto-generated file (as ‘Resources.Designer.cs’ tend to be), try deleting it and letting VS re-generate it. Either separately or in conjunction with #1, select Show All … Read more

An error occurred while signing: SignTool.exe not found

ClickOnce Publishing Tools are not installed as part of the Typical Installation Options. So you have to install it in advanced mode.  This dialog can be found in Windows 7 by going to Control Panel > Uninstall a program, right-clicking on Microsoft Visual Studio Professional 2015 and selecting Change. A Visual Studio dialog will open up. Select Modify from the set … Read more

What is and how to fix System.TypeInitializationException error?

Whenever a TypeInitializationException is thrown, check all initialization logic of the type you are referring to for the first time in the statement where the exception is thrown – in your case: Logger. Initialization logic includes: the type’s static constructor (which – if I didn’t miss it – you do not have for Logger) and field initialization. Field initialization is pretty … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)