C++ Operator+ Overloading of Matrix

I am learning to build my own Matrix class and get a question on the operator+ overloading.

Matrix Matrix::operator+(Matrix &b)
    Matrix temp;
    return temp;
c = a + b;

This works very well but I am a little concerned that is it inefficient that I declare a temporary matrix first then copy it to the final target (matrix c)? For example, below is a naive matrix add function,

void matrixAdd(Matrix& c, Matrix& a, Matrix& b)

Off course, the first one is easier to use but will the second be faster? If so, how can I improve the first one?

edit.GoToDefinition (F12) unsetable with Resharper

I have resharper installed and have tried this on both base keyboard configurations you can set resharper to (Visual Studio, and Resharper.) If I go to tools/options/keyboard and assign the keyboard F12 to edit.GoToDefinition and save it won’t work. I love resharper but this is the command I use the most and it’s killing me that it can’t be set. Any ideas how to get around this? I’ve tried:

1) Resetting all keyboard settings from internal/export options and re-configuring

2) Switching VS Versions

3) Reinstalling Resharper


PerformanceCounter giving different result than Task Manager

I have the following code:

PerformanceCounter c = new PerformanceCounter("Processor", "% Processor Time", "_Total");

And then I use it with: c.NextValue()

What I get is around twice as high as Task Manager manager shows as the cpu utilization. Though my cpu has 2 cores, as far as I know that’s not supposed to make a difference. So why is this happening?