I am just attaching a profiler then calling a static library and then detaching it. When i open the vsp file i am getting the error can anyine tellme what is the problem.I have added the code below.
#include "iostream"
#include "sstream"
#include<stdlib.h>
#include "final.cpp"
#include "Thefinal.cpp"
#include<Windows.h>
using namespace std;
int main()
{
unsigned int pid=(unsigned int)GetCurrentProcessId();
stringstream ss;
ss << pid;
std::string PID = ss.str();
std::string fileOutputCommand="\"\"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Team Tools\\Performance Tools\\VSPerfCmd.exe\" /start:sample/output:\"C:\\Program Files (x86)\\Microsoft
Visual Studio 10.0\\Team Tools\\Performance Tools\\sample10.vsp\"\"";
std::string aCommand="\"\"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Team Tools\\Performance Tools\\VSPerfCmd.exe\"/attach:\"\"";
string attachCommand=aCommand+PID;
std::string dCommand="\"\"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Team Tools\\Performance Tools\\VSPerfCmd.exe\"/detach:\"\"";
string detachCommand=dCommand+PID;
std::string shutdown = "\"\"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Team Tools\\Performance Tools\\VSPerfCmd.exe\"/shutdown\"\"";
system(fileOutputCommand.c_str());
system(attachCommand.c_str());
Thefinal b;
int y = b.add_numbers1(10,15);
cout<<y;
final a;
int x = a.add_numbers(5,10);
cout<<x;
system(detachCommand.c_str());
system(shutdown.c_str());
}
When i open sample10.vsp i am getting the error stated above.