string in visual c++ form

OK So i was trying to make a plugin for my sql and win sock Login Server, however apparently visual c++ 2010 form can't #include <string> and there is so such thing as System::String.

I can get string^ to work but i believe after declaration the value can't be changed.

Are their any other alternatives, or have i missed the string operator?

Thnx Buggy
#include <string> works fine on my 2010. idk why it wouldn't on yours though. :/
lil snippet of what i'm using it for is

1
2
3
4
5
6
7
8
9
 private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 		 
		 {
			string b = "a";
			b = "g";
			txtSQLID ->Text = "root";
			txtSQLPass ->Text = "";
			txtSQLIP ->Text = "127.0.0.1";
			txtSQLPort -> Text = "3306";
		 }


and the includes/namespace :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 #pragma once

#include <string>

namespace LoginServ 
{
	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace std;
	using std::string; 
Last edited on
Topic archived. No new replies allowed.