0

I am writing a program that requires me to call certain dos commands. I am using the system function like:

system("attrib -h");

when I try to compile it I get

error C3861: 'system': identifier not found

I am using vs2008

any ideas did the command change??

3
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by mrjoli021
0

these are all the includes I have

#include "stdafx.h"
#include <string.h>
#include "CameraWinService.h"
#include <string>
#include <iostream>
#include <fstream>
#include <windows.h>
#include <stdlib.h>
#include <cstdlib>

and it still does not work

0

>Is system part of the standard namespace?
Yes, but only in <cstdlib>. The OP seems to be including <stdlib.h> as well, which places system in the global namespace.

0

Attached is a ping function that I am having the same problem with.

void PingFunction()
		{
			String^ ip = "10.0.0.2";
			int tw0 = 2;

			system("ping ip");
				
		}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.