Strings in windows form

Jun 15, 2013 at 6:59pm
How to use string variable in windows form application?
I'm using Microsoft Visual C++ 2010 Express
And where to include libraries?
Jun 16, 2013 at 6:13am
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
Jun 16, 2013 at 12:37pm
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>
Jun 16, 2013 at 12:55pm
Jun 16, 2013 at 2:15pm
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
Jun 20, 2013 at 7:24am
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?
Jun 20, 2013 at 9:37am
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.
Jun 23, 2013 at 10:42am
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.