Strings in windows form

How to use string variable in windows form application?
I'm using Microsoft Visual C++ 2010 Express
And where to include libraries?
Some more information would be really handy to help fix your issue here :L
If I think you are referring to how to use the strings that are stored in for example "text boxes".
The text boxes use System::string^
You can marshal them over to other types.

Anyway thats what I thought you were asking I really don't have a clue because your question wasn't really well asked :L
Cheers
Kingpulse
For example i want to make a variable:
string welcome = "Hello world";
Where should I put it? In c++ file? Some kind of header?
And where should i put libraries? Like:
#include <string>
If that is not much of a help, you can PM me and let me know exactly what you are trying to do in order to help you.

Kind regards,
Raul
I think i didn't explain very well. OK
I got form application on VC++ 2010
I want to declare string variable. Like this:
string text = "test";
and also i got to include string library:
#include <string>

now where should i declare them?
I declared library at the top of "Form.h" file (after #pragma once)
And i declared string after library.
Is that a good place to declare variables and include libraries?
Nobody471 wrote:
Is that a good place to declare variables

Kinda. If you don't need to change it, it's good.
Otherwise you should put it in a class or in a function.
Nobody471 wrote:
and include libraries?

That's good.
I figured out it by myself. I just needed to write "std::" before "string"
I wrote "string text = 'test'"
Needed "std::string text = 'test'"
Topic archived. No new replies allowed.