Hello, I have a namespace and class defined inside a cpp file (say x.cpp ). I want to declare this class as 'friend' inside another header (say y.h), but the header won't recognize the namespace. Now, when I put the namespace in another header (x.h) and include it in y.h, I get a re-definition error ( also in x.cpp ). I can't remove the namespace definition from x.cpp, since it has been put together by a framework for me, and I won't be able to use the framework otherwise. Does this mean I can't declare this class as friend of any other class ? Regards, Raj Abhishek
R
Raj Abhishek
@Raj Abhishek
Posts
-
Need to declare a class ( defined in cpp file ) as friend -
Need to open an instance of excel in the same process as my main program.My software is an excel plug-in. We are using the C++ unit test framework embedded within Visual Studio to test it. Now, in my C++ unit test-code, when I open excel ( e.g. through shellexecute ), Excel opens up in a separate process and hence, I am not able to test my add-in code in the test process. How do I attach to the excel programatically so that I can follow the behaviour in the same process. It's a unit-test scenario and hence, we are trying to do everything with least manual intervention. Regards, Raj Abhishek