Inserting a char into a string.
From: Connell Gauld (connell_at_freebreakfast.co.uk)
Date: 02/06/05
- Next message: Ivan Vecerina: "Re: Inserting a char into a string."
- Previous message: =steFF=: "method printing values from a vector not working"
- Next in thread: Ivan Vecerina: "Re: Inserting a char into a string."
- Reply: Ivan Vecerina: "Re: Inserting a char into a string."
- Reply: wittempj_at_hotmail.com: "Re: Inserting a char into a string."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 06 Feb 2005 21:41:33 +0000
Hey,
Sorry if this is a really stupid question - I'm new to C++.
I have a program like this:
std::string str;
...
...
...
char buffer[4];
The variable buffer has been filled with four characters.
How do I now make str equal to buffer?
ie I have "ABCD" in buffer and I would like "ABCD" in str.
Thanks
Connell
- Next message: Ivan Vecerina: "Re: Inserting a char into a string."
- Previous message: =steFF=: "method printing values from a vector not working"
- Next in thread: Ivan Vecerina: "Re: Inserting a char into a string."
- Reply: Ivan Vecerina: "Re: Inserting a char into a string."
- Reply: wittempj_at_hotmail.com: "Re: Inserting a char into a string."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|