Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 00:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++]Verkettungs operator

Discussion on [C++]Verkettungs operator within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
Masterakio1995's Avatar
 
elite*gold: 8
Join Date: Apr 2009
Posts: 2,977
Received Thanks: 855
[C++]Verkettungs operator

Hallo!
Gibt es in C++ einen verkettunsoperator?
Und wen ja wie, wie lautet dieser?
In AutoIT ises &
in Php ises .
In JS ises +
Masterakio1995 is offline  
Old 07/26/2010, 15:36   #2
 
xWaffeleisen's Avatar
 
elite*gold: 320
Join Date: Oct 2009
Posts: 697
Received Thanks: 1,643
Du kannst in C++ nicht so einfach wie in AutoIt Strings zusammenbasteln.
Was du machen kannst, ist zb. sprintf verwenden (ist dann mehr C) oder du verwendest stringstream.

PS: Bisschen google hätte auch geholfen glaub ich
xWaffeleisen is offline  
Old 07/26/2010, 15:55   #3
 
Masterakio1995's Avatar
 
elite*gold: 8
Join Date: Apr 2009
Posts: 2,977
Received Thanks: 855
hab gegoogelt aber hab nur banhof verstanden -.-"
Masterakio1995 is offline  
Old 07/26/2010, 16:24   #4
 
elite*gold: 115
Join Date: Oct 2007
Posts: 9,390
Received Thanks: 12,345
Geht ganz einfach mit dem Operator "+".

Code:
#include <iostream>
#include <string>

using namespace std;

int main(int argc, char *argv[])
{
    string s;
    s = "abc";
    s += "def";
    cout << s << endl; 
    system("PAUSE");
    return EXIT_SUCCESS;
}
ms​ is offline  
Reply


Similar Threads Similar Threads
need operator or moderator for bee middle man
05/29/2010 - Silkroad Online Trading - 4 Replies
plz add me on msn assap :b [email protected]
[C++] "->"-Operator
04/11/2008 - C/C++ - 3 Replies
Hey, Ich probiere grade nen kleinen PixelBot zu schreiben. Folgendes habe ich jetzt aus Testgründen geschrieben: #include <iostream> #include <windows.h> using namespace std;



All times are GMT +1. The time now is 00:52.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.