I have created a completely new new Windows Form application and are trying to add this namespace:

#include "stdafx.h"
#include <ctime>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream> 
#include <string>  
#include <vector>
#include <cmath>
#include <algorithm>
#include <limits>
#include <ios>
#include <cstdio>
#include <numeric>
#include <cstdlib>
#include <ctype.h> 
#include <stdio.h>

using namespace System::Management;

I get this compile error.
However I have used this namespace in another project that I have and that works fine there so I dont know what I am missing to be able to use that namespace as I have code that depends on this namespace ? Thank you..

'Management' : is not a member of 'System'

I found out that I need to add reference to the Management namespace and that did solve the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.