Click here to Skip to main content
16,011,680 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: fastest way to look up a string Pin
Nemanja Trifunovic3-Sep-08 9:37
Nemanja Trifunovic3-Sep-08 9:37 
QuestionGetting VID and PID from device using UsbSer Pin
Roger Stoltz3-Sep-08 6:03
Roger Stoltz3-Sep-08 6:03 
QuestionSimple array-problem Pin
Joplinazz3-Sep-08 5:54
Joplinazz3-Sep-08 5:54 
AnswerRe: Simple array-problem Pin
toxcct3-Sep-08 6:05
toxcct3-Sep-08 6:05 
GeneralRe: Simple array-problem Pin
Joplinazz3-Sep-08 6:11
Joplinazz3-Sep-08 6:11 
GeneralRe: Simple array-problem Pin
toxcct3-Sep-08 6:24
toxcct3-Sep-08 6:24 
GeneralRe: Simple array-problem Pin
Joplinazz3-Sep-08 6:38
Joplinazz3-Sep-08 6:38 
AnswerRe: Simple array-problem Pin
Roger Stoltz3-Sep-08 6:31
Roger Stoltz3-Sep-08 6:31 
Well, looks good to me.
I suppose you have included iostream. It doesn't show since you haven't used the small < and > wonders below the text input frame when you posted your message.


Joplinazz wrote:
And one other thing; how can i create a string from several elements of this array?


Try this:
#include <sstream>

int main()
{
    std::string Strings[] = { "a", "b", "c" };
    std::ostringstream stm;

    stm << Strings[2] << Strings[0] << Strings[1] << std::endl;
    std::cout << stm.str().c_str();
}
You'll get "cab" written to cout.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: Simple array-problem Pin
Joplinazz3-Sep-08 8:03
Joplinazz3-Sep-08 8:03 
QuestionCreating a UI thread with CWinThread Pin
sashoalm3-Sep-08 4:57
sashoalm3-Sep-08 4:57 
AnswerRe: Creating a UI thread with CWinThread Pin
Mark Salsbery3-Sep-08 5:06
Mark Salsbery3-Sep-08 5:06 
GeneralRe: Creating a UI thread with CWinThread Pin
sashoalm3-Sep-08 5:10
sashoalm3-Sep-08 5:10 
GeneralRe: Creating a UI thread with CWinThread Pin
Mark Salsbery3-Sep-08 5:20
Mark Salsbery3-Sep-08 5:20 
GeneralRe: Creating a UI thread with CWinThread Pin
sashoalm3-Sep-08 5:26
sashoalm3-Sep-08 5:26 
Questionifstream Pin
FrankMookie3-Sep-08 4:36
FrankMookie3-Sep-08 4:36 
AnswerRe: ifstream [modified] Pin
toxcct3-Sep-08 4:52
toxcct3-Sep-08 4:52 
GeneralRe: ifstream Pin
FrankMookie3-Sep-08 5:05
FrankMookie3-Sep-08 5:05 
GeneralRe: ifstream Pin
toxcct3-Sep-08 5:06
toxcct3-Sep-08 5:06 
AnswerRe: ifstream Pin
David Crow3-Sep-08 4:57
David Crow3-Sep-08 4:57 
GeneralRe: ifstream Pin
FrankMookie3-Sep-08 5:03
FrankMookie3-Sep-08 5:03 
QuestionProblem with MFC ActiveX and Excel Pin
AnTri3-Sep-08 3:34
AnTri3-Sep-08 3:34 
QuestionAccess to xlsx-format? Pin
Andy@3-Sep-08 3:34
Andy@3-Sep-08 3:34 
QuestionRe: Access to xlsx-format? Pin
led mike3-Sep-08 4:27
led mike3-Sep-08 4:27 
AnswerRe: Access to xlsx-format? Pin
Andy@3-Sep-08 20:16
Andy@3-Sep-08 20:16 
GeneralRe: Access to xlsx-format? Pin
led mike4-Sep-08 8:00
led mike4-Sep-08 8:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.