⇤ ← Revision 1 as of 2014-06-25 22:32:23
Size: 705
Comment:
|
Size: 720
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
{{{ | {{{#!highlight c++ |
CPlusPlus
C++ programming language created by Bjarne Stroustrup
Sample app for Linux
Toggle line numbers
1 /*
2 gcc test.cpp -lstdc++ -o test
3 cpp test.cpp -o test
4 */
5
6 #include<vector>
7 #include<iostream>
8 #include<sstream>
9
10 class Teste{
11 public:
12 Teste(std::string xyz){
13 std::cout << xyz << "\r\n";
14 }
15 };
16
17 int main(){
18 std::vector<int> listInst = std::vector<int>();
19 std::cout <<"Hello world \r\n";
20 std::ostringstream oss(std::ostringstream::out);
21 int a = 1234;
22 char xpto[16]="AAA BBB";
23 oss << a << xpto << "\r\n";
24
25 std::cout << oss.str();
26 //std::ostringstream ost = std::ostringstream(ostringstream::out);
27 Teste x1("Ola aaaaaaa");
28 return 0;
29 }