Error Messages about System/Namespace. Need help.

I'm trying to make a program that generates a output file, but within my code, it keeps sending me these errors. I keep getting these erros

Error 1 error C2871: 'System' : a namespace with this name does not exist

I have 6 files and below is the code that is in them that is causing these error codes(it keeps highlighting each system line). I've included the fstream, manip and iostream as well as the string:

using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;

using namespace std;
using namespace System;
using namespace System::IO;
using namespace System::Windows::Forms;
using namespace System::Runtime::InteropServices;
The namespaces you are trying to use do not exist. Why are you trying to use them? You may want to post more of your code.
I've tried to post my code but the website says its too long
Last edited on
> I've tried to post my code but the website says its too long

Try pastebin or textuploader
Form 1.h(not sure if I'm doing this right)

<script src="//pastebin.com/embed_js/EWZzzq0N"></script>

Mantis.h

<script src="//pastebin.com/embed_js/JY7uWRCc"></script>

Resource.h

<script src="//pastebin.com/embed_js/t9Juf7x8"></script>

Stdafx.h
<script src="//pastebin.com/embed_js/AV4wvXPk"></script>

CPP

Assembly Code.cpp
<script src="//pastebin.com/embed_js/7RJi0AEy"></script>

Program3.cpp
<script src="//pastebin.com/embed_js/Bdx7wdyH"></script>

Mantis.cpp
<script src="//pastebin.com/embed_js/ew7uLEua"></script>

Stdafx.cpp
<script src="//pastebin.com/embed_js/ZukBvKPa"></script>


I also have a input text file.






Last edited on
Is it Java or C# code?
Try adding at the top
#using <system.dll>
What version of Visual Studio do you use ?
its C# and we're using Visual Studio 2012. It's a GUI Programming with C++ class.

Thomas: in which file should I put the #using <system.dil> in?
in which file should I put the #using <system.dil> in?


In the file where you get the error - probably program3.cpp
You also might need to add #using <mscorlib.dll>
Wait, hold on.
its C# and we're using Visual Studio 2012. It's a GUI Programming with C++ class.

How are you using those two languages together? Could you post a short example program you have worked on before that demonstrates the kind of code you are writing?
Hey! So I finally got my program to work after starting over. Thank you guys for the help!
Topic archived. No new replies allowed.